- java.lang.Object
-
- java.lang.Enum<OperatingSystem>
-
- org.arakhne.afc.vmutil.OperatingSystem
-
- All Implemented Interfaces:
Serializable
,Comparable<OperatingSystem>
public enum OperatingSystem extends Enum<OperatingSystem>
This is a list of supported operating system.- Version:
- 17.0 2020-01-04 14:41:35
- Author:
- Stéphane GALLAND
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- vmutils
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OperatingSystem
getCurrentOS()
Replies the current operating system.static String
getCurrentOSName()
Replies the name of the current OS.static String
getCurrentOSVersion()
Replies the version of the current OS.static OperatingSystemIdentificationType
getIdentificationType()
Replies the type of identification found on this operating system.static int
getOperatingSystemArchitectureDataModel()
Replies the data model of the current operating system: 32 or 64 bits.static String
getOSSerialNumber()
Get the OS serial number.static String
getOSSerialNumber(boolean enableSuperUser, boolean enableGUI)
Get the OS serial number.static String
getOSUUID()
Get the OS UUID.static String
getOSUUID(boolean enableSuperUser, boolean enableGUI)
Get the OS UUID.static boolean
is32BitOperatingSystem()
Replies if the current operating system is 32bit.static boolean
is64BitOperatingSystem()
Replies if the current operating system is 64bit.boolean
isCurrentOS()
Replies if the current OperatingSystem constant is corresponding to the current operating system.boolean
isUnixCompliant()
Replies of this OS is Unix compliant.static void
setCurrentOS(OperatingSystem os)
Force the type of the current OS replied by the functions of this class.static OperatingSystem
valueOf(String name)
Returns the enum constant of this type with the specified name.static OperatingSystem[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
WIN
public static final OperatingSystem WIN
Windows®.
-
LINUX
public static final OperatingSystem LINUX
Linux distribution.
-
ANDROID
public static final OperatingSystem ANDROID
Android Linux distribution.- Since:
- 7.0
-
SOLARIS
public static final OperatingSystem SOLARIS
Solaris®.
-
MACOSX
public static final OperatingSystem MACOSX
Mac OS X®.
-
FREEBSD
public static final OperatingSystem FREEBSD
Free BSD.
-
NETBSD
public static final OperatingSystem NETBSD
Net BSD.
-
BSD
public static final OperatingSystem BSD
Standard BSD.
-
OPENBSD
public static final OperatingSystem OPENBSD
Open BSD.
-
AIX
public static final OperatingSystem AIX
AIX®.
-
HPUX
public static final OperatingSystem HPUX
HPUX®.
-
OTHER
public static final OperatingSystem OTHER
Unknown operating systems.
-
-
Method Detail
-
values
public static OperatingSystem[] 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 (OperatingSystem c : OperatingSystem.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static OperatingSystem 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
-
getIdentificationType
@Pure public static OperatingSystemIdentificationType getIdentificationType()
Replies the type of identification found on this operating system.- Returns:
- the type of identification found on this operating system.
-
isCurrentOS
@Pure public boolean isCurrentOS()
Replies if the current OperatingSystem constant is corresponding to the current operating system.- Returns:
true
if the current operating system corresponds to this constant, otherwisefalse
-
isUnixCompliant
@Pure public boolean isUnixCompliant()
Replies of this OS is Unix compliant.- Returns:
true
if this constant corresponds to a Unix-like operating system, otherwisefalse
-
getCurrentOSName
@Pure public static String getCurrentOSName()
Replies the name of the current OS.- Returns:
- the name of the current operating system.
- See Also:
System.getProperty(java.lang.String)
-
getCurrentOSVersion
@Pure public static String getCurrentOSVersion()
Replies the version of the current OS.- Returns:
- the version of the current operating system.
- See Also:
System.getProperty(java.lang.String)
-
setCurrentOS
public static void setCurrentOS(OperatingSystem os)
Force the type of the current OS replied by the functions of this class.If the given OS is
null
, the current OS will be auto-detected at the next call ofgetCurrentOS()
.- Parameters:
os
- - the OS to consider for the next calls togetCurrentOS()
.- Since:
- 12.0
-
getCurrentOS
@Pure public static OperatingSystem getCurrentOS()
Replies the current operating system.- Returns:
- the current operating system constant.
-
getOperatingSystemArchitectureDataModel
@Pure public static int getOperatingSystemArchitectureDataModel()
Replies the data model of the current operating system: 32 or 64 bits.- Returns:
- the integer which is corresponding to the data model, or
0
if it could not be determined.
-
is64BitOperatingSystem
@Pure public static boolean is64BitOperatingSystem()
Replies if the current operating system is 64bit.- Returns:
true
if the operating system is 64bits, othewisefalse
-
is32BitOperatingSystem
@Pure public static boolean is32BitOperatingSystem()
Replies if the current operating system is 32bit.- Returns:
true
if the operating system is 32bits, othewisefalse
-
getOSSerialNumber
@Pure public static String getOSSerialNumber()
Get the OS serial number.This function does not allow to run any system command with the super-user rights, and it disable any additional GUI.
- Returns:
- the serial number associated to the current operating system.
-
getOSSerialNumber
@Pure public static String getOSSerialNumber(boolean enableSuperUser, boolean enableGUI)
Get the OS serial number.- Parameters:
enableSuperUser
- indicates if the super-user commands are enabled or not.enableGUI
- indicates if any additional GUI could be opened, or not.- Returns:
- the serial number associated to the current operating system.
- Since:
- 6.1
-
getOSUUID
@Pure public static String getOSUUID()
Get the OS UUID.This function does not allow to run any system command with the super-user rights, and it disable any additional GUI.
- Returns:
- an unique identifier for the current operating system.
-
getOSUUID
@Pure public static String getOSUUID(boolean enableSuperUser, boolean enableGUI)
Get the OS UUID.- Parameters:
enableSuperUser
- indicates if the super-user commands are enabled or not.enableGUI
- indicates if any additional GUI could be opened, or not.- Returns:
- an unique identifier for the current operating system.
- Since:
- 6.1
-
-