Enum DetOs

  • All Implemented Interfaces:
    Serializable, Comparable<DetOs>

    public enum DetOs
    extends 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 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​(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:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • isThis

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

        private static 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:
        IllegalStateException - if the operating system cannot be detected.
      • main

        public static void main​(String[] args)