Package com.twelvemonkeys.lang
Class Platform
- java.lang.Object
-
- com.twelvemonkeys.lang.Platform
-
public final class Platform extends java.lang.ObjectPlatform- 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 classPlatform.ArchitectureEnumeration of common SystemArchitectures.static classPlatform.OperatingSystemEnumeration of commonOperatingSystems.
-
Field Summary
Fields Modifier and Type Field Description (package private) Platform.ArchitecturearchitectureNormalized system architecture constantprivate static PlatformINSTANCE(package private) Platform.OperatingSystemosNormalized operating system constant(package private) java.lang.StringversionUnnormalized operating system version constant (for completeness)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Platform.Architecturearch()Shorthand forPlatform.get().getArchitecture().static Platformget()Returns the currentPlatform.Platform.ArchitecturegetArchitecture()Platform.OperatingSystemgetOS()java.lang.StringgetVersion()(package private) static Platform.ArchitecturenormalizeArchitecture(Platform.OperatingSystem pOsName, java.lang.String osArch)(package private) static Platform.OperatingSystemnormalizeOperatingSystem(java.lang.String osName)static Platform.OperatingSystemos()Shorthand forPlatform.get().getOS().static java.lang.Stringversion()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.
-
-