public class Platform
extends jogamp.common.os.PlatformPropsImpl
Some field declarations and it's static initialization has been delegated
to it's super class PlatformPropsImpl
to solve
static initialization interdependencies w/ the GlueGen native library loading
and it's derived information getMachineDescription()
, is32Bit()
, ..
This mechanism is preferred in this case to avoid synchronization and locking
and allow better performance accessing the mentioned fields/methods.
Modifier and Type | Class and Description |
---|---|
static class |
Platform.ABIType |
static class |
Platform.CPUFamily |
static class |
Platform.CPUType |
static class |
Platform.OSType |
Modifier and Type | Field and Description |
---|---|
static boolean |
AWT_AVAILABLE
true if AWT is available and not in headless mode, otherwise false . |
static boolean |
USE_TEMP_JAR_CACHE
System property: 'jogamp.gluegen.UseTempJarCache',
defaults to true if
PlatformPropsImpl.OS_TYPE is not Platform.OSType.ANDROID . |
ABI_TYPE, ARCH, ARCH_lower, CPU_ARCH, JAVA_6, JAVA_RUNTIME_NAME, JAVA_SE, JAVA_VENDOR, JAVA_VENDOR_URL, JAVA_VERSION, JAVA_VERSION_NUMBER, JAVA_VERSION_UPDATE, JAVA_VM_NAME, LITTLE_ENDIAN, NEWLINE, OS, os_and_arch, OS_lower, OS_TYPE, OS_VERSION, OS_VERSION_NUMBER, Version16, Version17
Modifier and Type | Method and Description |
---|---|
static long |
currentTimeMicros()
Returns the unix based current time in microseconds, based on
gettimeofday(..) . |
static long |
currentTimeMillis()
Returns the unix based current time in milliseconds, based on
gettimeofday(..) . |
static Platform.ABIType |
getABIType()
Returns the ABI type.
|
static String |
getArchName()
Returns the CPU architecture String.
|
static Platform.CPUFamily |
getCPUFamily()
Returns the CPU family.
|
static Platform.CPUType |
getCPUType()
Returns the CPU architecture type.
|
static long |
getCurrentSleepJitter()
Returns the estimated sleep jitter value in nanoseconds.
|
static String |
getJavaRuntimeName()
Returns the JAVA runtime name.
|
static String |
getJavaVendor()
Returns the JAVA vendor.
|
static String |
getJavaVendorURL()
Returns the JAVA vendor url.
|
static String |
getJavaVersion()
Returns the JAVA version.
|
static VersionNumber |
getJavaVersionNumber()
Returns the JAVA version number.
|
static String |
getJavaVMName()
Returns the JAVA VM name.
|
static MachineDescription |
getMachineDescription()
Returns the MachineDescription of the running machine.
|
static String |
getNewline()
Returns the platform's line separator.
|
static String |
getOSAndArch()
Returns the GlueGen common name for the currently running OSType and CPUType
as implemented in the build system in 'gluegen-cpptasks-base.xml'.
|
static String |
getOSName()
Returns the OS name.
|
static Platform.OSType |
getOSType()
Returns the OS type.
|
static String |
getOSVersion()
Returns the OS version.
|
static VersionNumber |
getOSVersionNumber()
Returns the OS version number.
|
static void |
initSingleton()
kick off static initialization of platform property information and native gluegen-rt lib loading
|
static boolean |
is32Bit()
Returns true if this JVM/ARCH is 32bit.
|
static boolean |
is64Bit()
Returns true if this JVM/ARCH is 64bit.
|
static boolean |
isAWTAvailable()
Returns
true if AWT is available and not in headless mode, otherwise false . |
static boolean |
isJava6()
Returns true only if being compatible w/ language level 6, e.g.
|
static boolean |
isJavaSE()
Returns true only if having
LongBuffer and DoubleBuffer available. |
static boolean |
isLittleEndian()
Returns true if this machine is little endian, otherwise false.
|
static boolean |
isRunningFromJarURL() |
public static final boolean USE_TEMP_JAR_CACHE
PlatformPropsImpl.OS_TYPE
is not Platform.OSType.ANDROID
.public static final boolean AWT_AVAILABLE
true
if AWT is available and not in headless mode, otherwise false
.public static final boolean isRunningFromJarURL()
public static void initSingleton()
public static boolean isJavaSE()
LongBuffer
and DoubleBuffer
available.public static boolean isJava6()
Implies isJavaSE()
.
Note: We claim Android is compatible.
public static boolean isLittleEndian()
public static String getOSName()
In case of Platform.OSType.ANDROID
, see getOSType()
, the OS name is Linux
public static String getOSVersion()
public static VersionNumber getOSVersionNumber()
public static String getArchName()
public static Platform.OSType getOSType()
In case of Platform.OSType.ANDROID
the OS name
, is Linux
public static Platform.CPUFamily getCPUFamily()
public static Platform.CPUType getCPUType()
public static Platform.ABIType getABIType()
In case of Platform.CPUFamily.ARM
, the value is determined by parsing the Elf Headers of the running VM.
Otherwise the value is Platform.ABIType.GENERIC_ABI
.
public static String getOSAndArch()
#getOSAndArch(OSType, CPUType)
public static String getJavaVendor()
public static String getJavaVMName()
public static String getJavaRuntimeName()
public static String getJavaVendorURL()
public static String getJavaVersion()
public static VersionNumber getJavaVersionNumber()
public static String getNewline()
public static boolean is32Bit()
Shortcut to getMachineDescription()
.is32Bit()
public static boolean is64Bit()
Shortcut to getMachineDescription()
.is64Bit()
public static MachineDescription getMachineDescription()
public static boolean isAWTAvailable()
true
if AWT is available and not in headless mode, otherwise false
.public static long currentTimeMillis()
gettimeofday(..)
.
This is an alternative to System.currentTimeMillis()
and System.nanoTime()
.
While the named System
methods do provide the required precision,
gettimeofday()
also guarantees time accuracy, i.e. update interval.
currentTimeMicros()
public static long currentTimeMicros()
gettimeofday(..)
.
This is an alternative to System.currentTimeMillis()
and System.nanoTime()
.
While the named System
methods do provide the required precision,
gettimeofday()
also guarantees time accuracy, i.e. update interval.
currentTimeMillis()
public static long getCurrentSleepJitter()
Includes a warm-up path, allowing hotspot to optimize the code.