Class Platform
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 getMachineDataInfo(), is32Bit(), ..
This mechanism is preferred in this case to avoid synchronization and locking
and allow better performance accessing the mentioned fields/methods.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enumstatic enumstatic enumNested classes/interfaces inherited from class jogamp.common.os.PlatformPropsImpl
jogamp.common.os.PlatformPropsImpl.OSXVersion -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleantrueif AWT is available and not in headless mode, otherwisefalse.static final booleanSystem property: 'jogamp.gluegen.UseTempJarCache', defaults to true ifPlatformPropsImpl.OS_TYPEis notPlatform.OSType.ANDROID.Fields inherited from class jogamp.common.os.PlatformPropsImpl
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, Version18, Version19 -
Method Summary
Modifier and TypeMethodDescriptionstatic longReturns the unix based current time in microseconds, based ongettimeofday(..).static longReturns the unix based current time in milliseconds, based ongettimeofday(..).static Platform.ABITypeReturns the ABI type.static StringReturns the CPU architecture String.static Platform.CPUFamilyReturns the CPU family.static Platform.CPUTypeReturns the CPU architecture type.static longReturns the estimated sleep jitter value in nanoseconds.static StringReturns the JAVA runtime name.static StringReturns the JAVA vendor.static StringReturns the JAVA vendor url.static StringReturns the JAVA version.static VersionNumberReturns the JAVA version number.static StringReturns the JAVA VM name.static MachineDataInfoReturns the MachineDataInfo of the running machine.static StringReturns the platform's line separator.static StringReturns the GlueGen common name for the currently running OSType and CPUType as implemented in the build system in 'gluegen-cpptasks-base.xml'.static StringReturns the OS name.static Platform.OSTypeReturns the OS type.static StringReturns the OS version.static VersionNumberReturns the OS version number.static voidkick off static initialization of platform property information and native gluegen2-rt lib loadingstatic booleanis32Bit()Returns true if this JVM/ARCH is 32bit.static booleanis64Bit()Returns true if this JVM/ARCH is 64bit.static booleanReturnstrueif AWT is available and not in headless mode, otherwisefalse.static booleanReturns true if this machine is little endian, otherwise false.static final booleanMethods inherited from class jogamp.common.os.PlatformPropsImpl
getOSAndArch, isCompatible
-
Field Details
-
USE_TEMP_JAR_CACHE
public static final boolean USE_TEMP_JAR_CACHESystem property: 'jogamp.gluegen.UseTempJarCache', defaults to true ifPlatformPropsImpl.OS_TYPEis notPlatform.OSType.ANDROID. -
AWT_AVAILABLE
public static final boolean AWT_AVAILABLEtrueif AWT is available and not in headless mode, otherwisefalse.
-
-
Method Details
-
isRunningFromJarURL
public static final boolean isRunningFromJarURL()- Returns:
- true if we're running from a Jar URL, otherwise false
-
initSingleton
public static void initSingleton()kick off static initialization of platform property information and native gluegen2-rt lib loading -
isLittleEndian
public static boolean isLittleEndian()Returns true if this machine is little endian, otherwise false. -
getOSName
Returns the OS name.In case of
Platform.OSType.ANDROID, seegetOSType(), the OS name is Linux -
getOSVersion
Returns the OS version. -
getOSVersionNumber
Returns the OS version number. -
getArchName
Returns the CPU architecture String. -
getOSType
Returns the OS type.In case of
Platform.OSType.ANDROIDtheOS name, is Linux -
getCPUFamily
Returns the CPU family. -
getCPUType
Returns the CPU architecture type. -
is32Bit
public static boolean is32Bit()Returns true if this JVM/ARCH is 32bit.Shortcut to
getCPUType().is32Bit -
is64Bit
public static boolean is64Bit()Returns true if this JVM/ARCH is 64bit.Shortcut to !
getCPUType().is32Bit -
getABIType
Returns the ABI type.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. -
getOSAndArch
Returns the GlueGen common name for the currently running OSType and CPUType as implemented in the build system in 'gluegen-cpptasks-base.xml'.- See Also:
-
#getOSAndArch(OSType, CPUType)
-
getJavaVendor
Returns the JAVA vendor. -
getJavaVMName
Returns the JAVA VM name. -
getJavaRuntimeName
Returns the JAVA runtime name. -
getJavaVendorURL
Returns the JAVA vendor url. -
getJavaVersion
Returns the JAVA version. -
getJavaVersionNumber
Returns the JAVA version number. -
getNewline
Returns the platform's line separator. -
getMachineDataInfo
Returns the MachineDataInfo of the running machine. -
isAWTAvailable
public static boolean isAWTAvailable()Returnstrueif AWT is available and not in headless mode, otherwisefalse. -
currentTimeMillis
public static long currentTimeMillis()Returns the unix based current time in milliseconds, based ongettimeofday(..).This is an alternative to
System.currentTimeMillis()andSystem.nanoTime(). While the namedSystemmethods do provide the required precision,gettimeofday()also guarantees time accuracy, i.e. update interval.- See Also:
-
currentTimeMicros
public static long currentTimeMicros()Returns the unix based current time in microseconds, based ongettimeofday(..).This is an alternative to
System.currentTimeMillis()andSystem.nanoTime(). While the namedSystemmethods do provide the required precision,gettimeofday()also guarantees time accuracy, i.e. update interval.- See Also:
-
getCurrentSleepJitter
public static long getCurrentSleepJitter()Returns the estimated sleep jitter value in nanoseconds.Includes a warm-up path, allowing hotspot to optimize the code.
-