Enum OSType

    • Enum Constant Detail

      • MacOS

        public static final OSType MacOS
        Macintosh.
      • Windows

        public static final OSType Windows
        Windows.
      • Linux

        public static final OSType Linux
        Linux.
      • Unknown

        public static final OSType Unknown
        Unknown.
    • Method Detail

      • values

        public static OSType[] 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 (OSType c : OSType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static OSType 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
      • currentOS

        public static OSType currentOS()
        Returns the current operating system type.
        Returns:
        The type.
      • javaExecutable

        public String javaExecutable()
        Default java executable.
        Returns:
        java executable name
      • withScriptExtension

        public String withScriptExtension​(String scriptName)
        Returns the scriptName with the SO related extension.
        Parameters:
        scriptName - The script file name without file extension
        Returns:
        The scriptName with SO extension
      • isPosix

        public boolean isPosix()
        To check that OS supports posix.
        Returns:
        true when OS supports posix or false if not.
      • scriptExecutor

        public String scriptExecutor()
        In some OSType is necessary to specify the program to execute the script.
        Returns:
        the program name to execute the script or null when it is not necessary.
      • statFormat

        public String statFormat()
        Returns the stat format that depends on OS.
        Returns:
        the stat format
      • mavenExec

        public String mavenExec()
        Returns the maven execution file name.
        Returns:
        the maven exec
      • escapedQuote

        public String escapedQuote()
        Returns an escaped quote for this OS.
        Returns:
        The escaped quote.