- java.lang.Object
-
- java.lang.Enum<OSType>
-
- io.helidon.build.util.OSType
-
- All Implemented Interfaces:
Serializable,Comparable<OSType>
public enum OSType extends Enum<OSType>
Operating system types.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OSTypecurrentOS()Returns the current operating system type.StringescapedQuote()Returns an escaped quote for this OS.booleanisPosix()To check that OS supports posix.StringjavaExecutable()Default java executable.StringmavenExec()Returns the maven execution file name.StringscriptExecutor()In some OSType is necessary to specify the program to execute the script.StringstatFormat()Returns the stat format that depends on OS.static OSTypevalueOf(String name)Returns the enum constant of this type with the specified name.static OSType[]values()Returns an array containing the constants of this enum type, in the order they are declared.StringwithScriptExtension(String scriptName)Returns the scriptName with the SO related extension.
-
-
-
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 nameNullPointerException- 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.
-
-