jruby/docs BETA
Navigation
org.jruby.ext.ffi 33
C AbstractInvoker
C AbstractMemory
I AllocatedDirectMemoryIO
C ArrayMemoryIO
C AutoPointer
C Buffer
C CallbackInfo
C CallbackManager
C DataConverter
C Enums
C FFI
C FFIService
C Factory
C FreedMemoryIO
C IOModule
C InvalidMemoryIO
C MappedType
C MemoryIO
C MemoryObject
C MemoryPointer
C MemoryUtil
E NativeType
C NoImplFactory
C NullMemoryIO
C Platform
C Pointer
C Struct
C StructByValue
C StructLayout
C SwappedMemoryIO
C Type
C TypeResolver
C Util
Platform — members 29
F CPU() CPU_TYPE
F OS() OS_TYPE
F NAME() String
F LIBPREFIX() String
F LIBSUFFIX() String
F LIBC() String
F BIG_ENDIAN() int
F LITTLE_ENDIAN() int
F BYTE_ORDER() int
M address_mask() long
M address_size() int
M bsd?() boolean
M bsd_p(context, recv) IRubyObject
M cpu() CPU_TYPE
C create_platform_module(context, ffi)
M get_property(property, def_value) String
M java_major_version() int
M linux_p(context, recv) IRubyObject
M long_size() int
M mac_p(context, recv) IRubyObject
M map_library_name(lib_name) String
M name() String
M os() OS_TYPE
M platform() Platform
M solaris_p(context, recv) IRubyObject
M supported?() boolean
M unix?() boolean
M unix_p(context, recv) IRubyObject
M windows_p(context, recv) IRubyObject

org.jruby.ext.ffi.Platform

class 29 members

Constants

constanttypenote
CPU Platform.CPU_TYPE
OS Platform.OS_TYPE
NAME String
LIBPREFIX String
LIBSUFFIX String
LIBC String
BIG_ENDIAN int
LITTLE_ENDIAN int
BYTE_ORDER int

Class Methods

bsd_p

IRubyObject bsd_p ( ThreadContext context, IRubyObject recv )
Java: bsd_p(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv)

create_platform_module

create_platform_module ( ThreadContext context, RubyModule ffi )
Java: createPlatformModule(org.jruby.runtime.ThreadContext context, org.jruby.RubyModule FFI)

get_property

String get_property ( String property, String def_value )
Java: getProperty(String property, String defValue)

An extension over System.getProperty method. Handles security restrictions, and returns the default value if the access to the property is restricted.

nametypedescription
propertyStringThe system property name.
def_valueStringThe default value.

Returns: The value of the system property, or the default value.

linux_p

IRubyObject linux_p ( ThreadContext context, IRubyObject recv )
Java: linux_p(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv)

mac_p

IRubyObject mac_p ( ThreadContext context, IRubyObject recv )
Java: mac_p(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv)

platform

Platform platform ( )
Java: getPlatform() · also: get_platform

Gets the current Platform

Returns: The current platform.

solaris_p

IRubyObject solaris_p ( ThreadContext context, IRubyObject recv )
Java: solaris_p(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv)

unix_p

IRubyObject unix_p ( ThreadContext context, IRubyObject recv )
Java: unix_p(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv)

windows_p

IRubyObject windows_p ( ThreadContext context, IRubyObject recv )
Java: windows_p(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv)

Instance Methods

address_mask

long address_mask ( )
Java: addressMask()

Gets the 32/64bit mask of a C address/pointer on the native platform.

Returns: the size of a pointer in bits

address_size

int address_size ( )
Java: addressSize()

Gets the size of a C address/pointer on the native platform.

Returns: the size of a pointer in bits

bsd?

boolean bsd? ( )
Java: isBSD() · also: is_bsd

cpu

Platform.CPU_TYPE cpu ( )
Java: getCPU() · also: get_cpu

Gets the current processor architecture the JVM is running on.

Returns: A CPU value representing the current processor architecture.

java_major_version

int java_major_version ( )
Java: getJavaMajorVersion() · also: get_java_major_version

long_size

int long_size ( )
Java: longSize()

Gets the size of a C 'long' on the native platform.

Returns: the size of a long in bits

map_library_name

String map_library_name ( String lib_name )
Java: mapLibraryName(String libName)

name

String name ( )
Java: getName() · also: get_name

Gets the name of this Platform.

Returns: The name of this platform.

os

Platform.OS_TYPE os ( )
Java: getOS() · also: get_os

Gets the current Operating System.

Returns: A OS value representing the current Operating System.

supported?

boolean supported? ( )
Java: isSupported() · also: is_supported

unix?

boolean unix? ( )
Java: isUnix() · also: is_unix
Copyright (C) 2008 JRuby project