Package me.friwi.jcefmaven
Enum EnumPlatform
- java.lang.Object
-
- java.lang.Enum<EnumPlatform>
-
- me.friwi.jcefmaven.EnumPlatform
-
- All Implemented Interfaces:
Serializable,Comparable<EnumPlatform>
public enum EnumPlatform extends Enum<EnumPlatform>
Enum representing all supported operating system and architecture combinations. Fetch the currently applying platform usinggetCurrentPlatform(). UsegetOs()to extract the operating system only.- Author:
- Fritz Windisch
-
-
Enum Constant Summary
Enum Constants Enum Constant Description LINUX_AMD64LINUX_ARMLINUX_ARM64MACOSX_AMD64MACOSX_ARM64WINDOWS_AMD64WINDOWS_ARM64WINDOWS_I386
-
Field Summary
Fields Modifier and Type Field Description static StringPROPERTY_OS_ARCHstatic StringPROPERTY_OS_NAME
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EnumPlatformgetCurrentPlatform()Fetches the platform this program is running on.StringgetIdentifier()Method used internally to fetch the identifier used in jcefbuild.EnumOSgetOs()Fetch the operating system of this platformstatic EnumPlatformvalueOf(String name)Returns the enum constant of this type with the specified name.static EnumPlatform[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
MACOSX_AMD64
public static final EnumPlatform MACOSX_AMD64
-
MACOSX_ARM64
public static final EnumPlatform MACOSX_ARM64
-
LINUX_AMD64
public static final EnumPlatform LINUX_AMD64
-
LINUX_ARM64
public static final EnumPlatform LINUX_ARM64
-
LINUX_ARM
public static final EnumPlatform LINUX_ARM
-
WINDOWS_AMD64
public static final EnumPlatform WINDOWS_AMD64
-
WINDOWS_I386
public static final EnumPlatform WINDOWS_I386
-
WINDOWS_ARM64
public static final EnumPlatform WINDOWS_ARM64
-
-
Field Detail
-
PROPERTY_OS_NAME
public static final String PROPERTY_OS_NAME
- See Also:
- Constant Field Values
-
PROPERTY_OS_ARCH
public static final String PROPERTY_OS_ARCH
- See Also:
- Constant Field Values
-
-
Method Detail
-
values
public static EnumPlatform[] 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 (EnumPlatform c : EnumPlatform.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static EnumPlatform 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
-
getCurrentPlatform
public static EnumPlatform getCurrentPlatform() throws UnsupportedPlatformException
Fetches the platform this program is running on.- Returns:
- the current platform
- Throws:
UnsupportedPlatformException- if the platform could not be determined
-
getIdentifier
public String getIdentifier()
Method used internally to fetch the identifier used in jcefbuild.- Returns:
- the platform identifier, a lower case string in the format of os-arch (e.g. linux-amd64)
-
getOs
public EnumOS getOs()
Fetch the operating system of this platform- Returns:
- the os
-
-