Enum DetOs

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<DetOs>

    public enum DetOs
    extends java.lang.Enum<DetOs>
    Enumerates the most important operating system and determines the current operating system. This is needed for jne/jna-applications, not when used with pure jave.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      Mac  
      Nix  
      Solaris  
      Win  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private DetOs()  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      static DetOs getOpSys()
      Returns a representation of the operating system currently running.
      (package private) abstract boolean isThis()
      Returns whether this is the operating system currently running.
      static void main​(java.lang.String[] args)  
      private static java.lang.String osString()
      Returns a string representation of the operating system currently running as given by property os.name in lower case.
      static DetOs valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static DetOs[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • Win

        public static final DetOs Win
      • Nix

        public static final DetOs Nix
      • Mac

        public static final DetOs Mac
      • Solaris

        public static final DetOs Solaris
    • Constructor Detail

      • DetOs

        private DetOs()
    • Method Detail

      • values

        public static DetOs[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (DetOs c : DetOs.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static DetOs valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • isThis

        abstract boolean isThis()
        Returns whether this is the operating system currently running.
      • osString

        private static java.lang.String osString()
        Returns a string representation of the operating system currently running as given by property os.name in lower case.
        See Also:
        System.getProperty(String)
      • getOpSys

        public static DetOs getOpSys()
        Returns a representation of the operating system currently running.
        Throws:
        java.lang.IllegalStateException - if the operating system cannot be detected.
      • main

        public static void main​(java.lang.String[] args)