public class Platform
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Platform.CPU_TYPE |
static class |
Platform.OS_TYPE |
| Modifier and Type | Field and Description |
|---|---|
protected int |
addressSize |
static int |
BIG_ENDIAN |
static int |
BYTE_ORDER |
static Platform.CPU_TYPE |
CPU |
static java.lang.String |
LIBC |
protected java.util.regex.Pattern |
libPattern |
static java.lang.String |
LIBPREFIX |
static java.lang.String |
LIBSUFFIX |
static int |
LITTLE_ENDIAN |
protected int |
longSize |
static java.lang.String |
NAME |
static Platform.OS_TYPE |
OS |
| Modifier | Constructor and Description |
|---|---|
protected |
Platform(Platform.OS_TYPE os) |
| Modifier and Type | Method and Description |
|---|---|
long |
addressMask()
Gets the 32/64bit mask of a C address/pointer on the native platform.
|
int |
addressSize()
Gets the size of a C address/pointer on the native platform.
|
static IRubyObject |
bsd_p(ThreadContext context,
IRubyObject recv) |
static void |
createPlatformModule(Ruby runtime,
RubyModule ffi) |
Platform.CPU_TYPE |
getCPU()
Gets the current processor architecture the JVM is running on.
|
int |
getJavaMajorVersion()
Gets the version of the Java Virtual Machine (JVM) jffi is running on.
|
java.lang.String |
getName()
Gets the name of this
Platform. |
Platform.OS_TYPE |
getOS()
Gets the current Operating System.
|
static Platform |
getPlatform()
Gets the current
Platform |
static java.lang.String |
getProperty(java.lang.String property,
java.lang.String defValue)
An extension over
System.getProperty method. |
boolean |
isBSD() |
boolean |
isSupported() |
boolean |
isUnix() |
static IRubyObject |
linux_p(ThreadContext context,
IRubyObject recv) |
int |
longSize()
Gets the size of a C 'long' on the native platform.
|
static IRubyObject |
mac_p(ThreadContext context,
IRubyObject recv) |
java.lang.String |
mapLibraryName(java.lang.String libName) |
static IRubyObject |
solaris_p(ThreadContext context,
IRubyObject recv) |
static IRubyObject |
unix_p(ThreadContext context,
IRubyObject recv) |
static IRubyObject |
windows_p(ThreadContext context,
IRubyObject recv) |
public static final Platform.CPU_TYPE CPU
public static final Platform.OS_TYPE OS
public static final java.lang.String NAME
public static final java.lang.String LIBPREFIX
public static final java.lang.String LIBSUFFIX
public static final java.lang.String LIBC
public static final int BIG_ENDIAN
public static final int LITTLE_ENDIAN
public static final int BYTE_ORDER
protected final int addressSize
protected final int longSize
protected final java.util.regex.Pattern libPattern
protected Platform(Platform.OS_TYPE os)
public static final Platform getPlatform()
Platformpublic final Platform.OS_TYPE getOS()
OS value representing the current Operating System.public final Platform.CPU_TYPE getCPU()
CPU value representing the current processor architecture.public final int getJavaMajorVersion()
public final boolean isBSD()
public final boolean isUnix()
public final boolean isSupported()
public static void createPlatformModule(Ruby runtime, RubyModule ffi)
public static IRubyObject windows_p(ThreadContext context, IRubyObject recv)
public static IRubyObject mac_p(ThreadContext context, IRubyObject recv)
public static IRubyObject unix_p(ThreadContext context, IRubyObject recv)
public static IRubyObject bsd_p(ThreadContext context, IRubyObject recv)
public static IRubyObject linux_p(ThreadContext context, IRubyObject recv)
public static IRubyObject solaris_p(ThreadContext context, IRubyObject recv)
public static java.lang.String getProperty(java.lang.String property,
java.lang.String defValue)
System.getProperty method.
Handles security restrictions, and returns the default
value if the access to the property is restricted.property - The system property name.defValue - The default value.public final int longSize()
public final int addressSize()
public final long addressMask()
public java.lang.String getName()
Platform.public java.lang.String mapLibraryName(java.lang.String libName)
Copyright © 2001-2023 JRuby. All Rights Reserved.