Package com.twelvemonkeys.lang
Class Platform
- java.lang.Object
-
- com.twelvemonkeys.lang.Platform
-
public final class Platform extends java.lang.Object
Platform- Version:
- $Id: //depot/branches/personal/haraldk/twelvemonkeys/release-2/twelvemonkeys-core/src/main/java/com/twelvemonkeys/lang/Platform.java#1 $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Platform.Architecture
Enumeration of common SystemArchitecture
s.static class
Platform.OperatingSystem
Enumeration of commonOperatingSystem
s.
-
Field Summary
Fields Modifier and Type Field Description (package private) Platform.Architecture
architecture
Normalized system architecture constantprivate static Platform
INSTANCE
(package private) Platform.OperatingSystem
os
Normalized operating system constant(package private) java.lang.String
version
Unnormalized operating system version constant (for completeness)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Platform.Architecture
arch()
Shorthand forPlatform.get().getArchitecture()
.static Platform
get()
Returns the currentPlatform
.Platform.Architecture
getArchitecture()
Platform.OperatingSystem
getOS()
java.lang.String
getVersion()
(package private) static Platform.Architecture
normalizeArchitecture(Platform.OperatingSystem pOsName, java.lang.String osArch)
(package private) static Platform.OperatingSystem
normalizeOperatingSystem(java.lang.String osName)
static Platform.OperatingSystem
os()
Shorthand forPlatform.get().getOS()
.static java.lang.String
version()
Shorthand forPlatform.get().getVersion()
.
-
-
-
Field Detail
-
os
final Platform.OperatingSystem os
Normalized operating system constant
-
version
final java.lang.String version
Unnormalized operating system version constant (for completeness)
-
architecture
final Platform.Architecture architecture
Normalized system architecture constant
-
INSTANCE
private static final Platform INSTANCE
-
-
Method Detail
-
normalizeOperatingSystem
static Platform.OperatingSystem normalizeOperatingSystem(java.lang.String osName)
-
normalizeArchitecture
static Platform.Architecture normalizeArchitecture(Platform.OperatingSystem pOsName, java.lang.String osArch)
-
get
public static Platform get()
Returns the currentPlatform
.- Returns:
- the current
Platform
.
-
getOS
public Platform.OperatingSystem getOS()
- Returns:
- this platform's OS.
-
getVersion
public java.lang.String getVersion()
- Returns:
- this platform's OS version.
-
getArchitecture
public Platform.Architecture getArchitecture()
- Returns:
- this platform's architecture.
-
os
public static Platform.OperatingSystem os()
Shorthand forPlatform.get().getOS()
.- Returns:
- the current
OperatingSystem
.
-
version
public static java.lang.String version()
Shorthand forPlatform.get().getVersion()
.- Returns:
- the current OS version.
-
arch
public static Platform.Architecture arch()
Shorthand forPlatform.get().getArchitecture()
.- Returns:
- the current
Architecture
.
-
-