|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jruby.ext.ffi.Platform
public class Platform
Nested Class Summary | |
---|---|
static class |
Platform.CPU_TYPE
|
static class |
Platform.OS_TYPE
|
Field Summary | |
---|---|
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
|
Constructor Summary | |
---|---|
protected |
Platform(Platform.OS_TYPE os)
|
Method Summary | |
---|---|
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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
Constructor Detail |
---|
protected Platform(Platform.OS_TYPE os)
Method Detail |
---|
public static final Platform getPlatform()
public final Platform.OS_TYPE getOS()
public final Platform.CPU_TYPE getCPU()
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()
public java.lang.String mapLibraryName(java.lang.String libName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |