GlueGen v2.6.0-rc-20250712
GlueGen, Native Binding Generator for Java™ (public API).
com.jogamp.common.os.Platform Class Reference

Utility class for querying platform specific properties. More...

Inheritance diagram for com.jogamp.common.os.Platform:
Collaboration diagram for com.jogamp.common.os.Platform:

Classes

enum  ABIType
 
enum  CPUFamily
 
enum  CPUType
 
enum  OSType
 

Static Public Member Functions

static final boolean isRunningFromJarURL ()
 
static void initSingleton ()
 kick off static initialization of platform property information and native gluegen_rt lib loading More...
 
static boolean isLittleEndian ()
 Returns true if this machine is little endian, otherwise false. More...
 
static String getOSName ()
 Returns the OS name. More...
 
static String getOSVersion ()
 Returns the OS version. More...
 
static VersionNumber getOSVersionNumber ()
 Returns the OS version number. More...
 
static String getArchName ()
 Returns the CPU architecture String. More...
 
static OSType getOSType ()
 Returns the OS type. More...
 
static CPUFamily getCPUFamily ()
 Returns the CPU family. More...
 
static CPUType getCPUType ()
 Returns the CPU architecture type. More...
 
static boolean is32Bit ()
 Returns true if this JVM/ARCH is 32bit. More...
 
static boolean is64Bit ()
 Returns true if this JVM/ARCH is 64bit. More...
 
static ABIType getABIType ()
 Returns the ABI type. More...
 
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'. More...
 
static String getJavaVendor ()
 Returns the JAVA vendor. More...
 
static String getJavaVMName ()
 Returns the JAVA VM name. More...
 
static String getJavaRuntimeName ()
 Returns the JAVA runtime name. More...
 
static String getJavaVendorURL ()
 Returns the JAVA vendor url. More...
 
static String getJavaVersion ()
 Returns the JAVA version. More...
 
static VersionNumber getJavaVersionNumber ()
 Returns the JAVA version number. More...
 
static String getNewline ()
 Returns the platform's line separator. More...
 
static MachineDataInfo getMachineDataInfo ()
 Returns the MachineDataInfo of the running machine. More...
 
static boolean isAWTAvailable ()
 Returns true if AWT is available and not in headless mode, otherwise false. More...
 
static long currentMillis ()
 Returns current monotonic milliseconds since start of this application. More...
 
static long currentTimeMillis ()
 Returns the unix based current monotonic time in milliseconds. More...
 
static synchronized long getCurrentSleepJitter ()
 Returns the estimated sleep jitter value in nanoseconds. More...
 

Static Public Attributes

static final boolean USE_TEMP_JAR_CACHE
 System property: 'jogamp.gluegen.UseTempJarCache', defaults to true if OS_TYPE is not OSType#ANDROID. More...
 
static final boolean AWT_AVAILABLE
 true if AWT is available and not in headless mode, otherwise false. More...
 

Detailed Description

Utility class for querying platform specific properties.

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.

Definition at line 58 of file Platform.java.

Member Function Documentation

◆ currentMillis()

static long com.jogamp.common.os.Platform.currentMillis ( )
static

Returns current monotonic milliseconds since start of this application.

Monotonic time shall be used for high-performance measurements of durations, since the underlying OS shall support fast calls.

See also
Clock::currentMillis()

Definition at line 531 of file Platform.java.

Here is the call graph for this function:

◆ currentTimeMillis()

static long com.jogamp.common.os.Platform.currentTimeMillis ( )
static

Returns the unix based current monotonic time in milliseconds.

Monotonic time shall be used for high-performance measurements of durations, since the underlying OS shall support fast calls.

See also
Clock::currentTimeMillis()

Definition at line 543 of file Platform.java.

Here is the call graph for this function:

◆ getABIType()

static ABIType com.jogamp.common.os.Platform.getABIType ( )
static

Returns the ABI type.

In case of CPUFamily#ARM, the value is determined by parsing the Elf Headers of the running VM.

Otherwise the value is ABIType#GENERIC_ABI.

Definition at line 444 of file Platform.java.

Here is the caller graph for this function:

◆ getArchName()

static String com.jogamp.common.os.Platform.getArchName ( )
static

Returns the CPU architecture String.

Definition at line 393 of file Platform.java.

Here is the caller graph for this function:

◆ getCPUFamily()

static CPUFamily com.jogamp.common.os.Platform.getCPUFamily ( )
static

Returns the CPU family.

Definition at line 408 of file Platform.java.

Here is the caller graph for this function:

◆ getCPUType()

static CPUType com.jogamp.common.os.Platform.getCPUType ( )
static

Returns the CPU architecture type.

Definition at line 415 of file Platform.java.

Here is the caller graph for this function:

◆ getCurrentSleepJitter()

static synchronized long com.jogamp.common.os.Platform.getCurrentSleepJitter ( )
static

Returns the estimated sleep jitter value in nanoseconds.

Includes a warm-up path, allowing hotspot to optimize the code.

Definition at line 553 of file Platform.java.

◆ getJavaRuntimeName()

static String com.jogamp.common.os.Platform.getJavaRuntimeName ( )
static

Returns the JAVA runtime name.

Definition at line 475 of file Platform.java.

Here is the caller graph for this function:

◆ getJavaVendor()

static String com.jogamp.common.os.Platform.getJavaVendor ( )
static

Returns the JAVA vendor.

Definition at line 461 of file Platform.java.

Here is the caller graph for this function:

◆ getJavaVendorURL()

static String com.jogamp.common.os.Platform.getJavaVendorURL ( )
static

Returns the JAVA vendor url.

Definition at line 482 of file Platform.java.

Here is the caller graph for this function:

◆ getJavaVersion()

static String com.jogamp.common.os.Platform.getJavaVersion ( )
static

Returns the JAVA version.

Definition at line 489 of file Platform.java.

Here is the caller graph for this function:

◆ getJavaVersionNumber()

static VersionNumber com.jogamp.common.os.Platform.getJavaVersionNumber ( )
static

Returns the JAVA version number.

Definition at line 496 of file Platform.java.

Here is the caller graph for this function:

◆ getJavaVMName()

static String com.jogamp.common.os.Platform.getJavaVMName ( )
static

Returns the JAVA VM name.

Definition at line 468 of file Platform.java.

Here is the caller graph for this function:

◆ getMachineDataInfo()

static MachineDataInfo com.jogamp.common.os.Platform.getMachineDataInfo ( )
static

Returns the MachineDataInfo of the running machine.

Definition at line 510 of file Platform.java.

Here is the caller graph for this function:

◆ getNewline()

static String com.jogamp.common.os.Platform.getNewline ( )
static

Returns the platform's line separator.

Definition at line 503 of file Platform.java.

Here is the caller graph for this function:

◆ getOSAndArch()

static String com.jogamp.common.os.Platform.getOSAndArch ( )
static

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)

Definition at line 454 of file Platform.java.

Here is the caller graph for this function:

◆ getOSName()

static String com.jogamp.common.os.Platform.getOSName ( )
static

Returns the OS name.

In case of OSType#ANDROID, see getOSType(), the OS name is Linux

Definition at line 372 of file Platform.java.

Here is the caller graph for this function:

◆ getOSType()

static OSType com.jogamp.common.os.Platform.getOSType ( )
static

Returns the OS type.

In case of OSType#ANDROID the OS name, is Linux

Definition at line 401 of file Platform.java.

Here is the caller graph for this function:

◆ getOSVersion()

static String com.jogamp.common.os.Platform.getOSVersion ( )
static

Returns the OS version.

Definition at line 379 of file Platform.java.

Here is the caller graph for this function:

◆ getOSVersionNumber()

static VersionNumber com.jogamp.common.os.Platform.getOSVersionNumber ( )
static

Returns the OS version number.

Definition at line 386 of file Platform.java.

Here is the caller graph for this function:

◆ initSingleton()

static void com.jogamp.common.os.Platform.initSingleton ( )
static

kick off static initialization of platform property information and native gluegen_rt lib loading

Definition at line 359 of file Platform.java.

Here is the caller graph for this function:

◆ is32Bit()

static boolean com.jogamp.common.os.Platform.is32Bit ( )
static

Returns true if this JVM/ARCH is 32bit.

Shortcut to getCPUType().is32Bit

Definition at line 423 of file Platform.java.

Here is the caller graph for this function:

◆ is64Bit()

static boolean com.jogamp.common.os.Platform.is64Bit ( )
static

Returns true if this JVM/ARCH is 64bit.

Shortcut to !getCPUType().is32Bit

Definition at line 431 of file Platform.java.

◆ isAWTAvailable()

static boolean com.jogamp.common.os.Platform.isAWTAvailable ( )
static

Returns true if AWT is available and not in headless mode, otherwise false.

Definition at line 515 of file Platform.java.

◆ isLittleEndian()

static boolean com.jogamp.common.os.Platform.isLittleEndian ( )
static

Returns true if this machine is little endian, otherwise false.

Definition at line 364 of file Platform.java.

Here is the caller graph for this function:

◆ isRunningFromJarURL()

static final boolean com.jogamp.common.os.Platform.isRunningFromJarURL ( )
static
Returns
true if we're running from a Jar URL, otherwise false

Definition at line 352 of file Platform.java.

Member Data Documentation

◆ AWT_AVAILABLE

final boolean com.jogamp.common.os.Platform.AWT_AVAILABLE
static

true if AWT is available and not in headless mode, otherwise false.

Definition at line 281 of file Platform.java.

◆ USE_TEMP_JAR_CACHE

final boolean com.jogamp.common.os.Platform.USE_TEMP_JAR_CACHE
static

System property: 'jogamp.gluegen.UseTempJarCache', defaults to true if OS_TYPE is not OSType#ANDROID.

Definition at line 272 of file Platform.java.


The documentation for this class was generated from the following file: