Package org.jruby.ext.ffi
Class Util
java.lang.Object
org.jruby.ext.ffi.Util
-
Method Summary
Modifier and TypeMethodDescriptionstatic final void
checkBounds
(Ruby runtime, long size, long off, long len) static final <T> T
convertParameter
(IRubyObject parameter, Class<T> paramClass) Deprecated.static final double
doubleValue
(IRubyObject parameter) Deprecated.static final double
doubleValue
(ThreadContext context, IRubyObject parameter) static Type
findType
(ThreadContext context, IRubyObject name) static Type
findType
(ThreadContext context, IRubyObject name, IRubyObject typeMap) static final float
floatValue
(IRubyObject parameter) Deprecated.static final float
floatValue
(ThreadContext context, IRubyObject parameter) static final short
int16Value
(IRubyObject parameter) static final int
int32Value
(IRubyObject parameter) static final long
int64Value
(IRubyObject parameter) static final byte
int8Value
(IRubyObject parameter) static int
intValue
(IRubyObject obj, RubyHash enums) Deprecated.static final long
longValue
(IRubyObject parameter) Converts characters like 'a' or 't' to an integer valuestatic final IRubyObject
newSigned16
(Ruby runtime, short value) static final IRubyObject
newSigned32
(Ruby runtime, int value) static final IRubyObject
newSigned64
(Ruby runtime, long value) static final IRubyObject
newSigned8
(Ruby runtime, byte value) static final IRubyObject
newUnsigned16
(Ruby runtime, short value) static final IRubyObject
newUnsigned32
(Ruby runtime, int value) static final IRubyObject
newUnsigned64
(Ruby runtime, long value) static final IRubyObject
newUnsigned8
(Ruby runtime, byte value) static ByteOrder
parseByteOrder
(Ruby runtime, IRubyObject byte_order) static int
roundUpToPowerOfTwo
(int v) static final ByteBuffer
slice
(ByteBuffer buf, int offset) static final int
uint16Value
(IRubyObject parameter) static final long
uint32Value
(IRubyObject parameter) static final long
uint64Value
(IRubyObject parameter) static final short
uint8Value
(IRubyObject parameter) static final long
ulongValue
(IRubyObject parameter)
-
Method Details
-
int8Value
-
uint8Value
-
int16Value
-
uint16Value
-
int32Value
-
uint32Value
-
int64Value
-
uint64Value
-
floatValue
Deprecated. -
floatValue
-
doubleValue
Deprecated. -
doubleValue
-
longValue
Converts characters like 'a' or 't' to an integer value- Parameters:
parameter
-- Returns:
-
intValue
Deprecated. -
ulongValue
-
newSigned8
-
newUnsigned8
-
newSigned16
-
newUnsigned16
-
newSigned32
-
newUnsigned32
-
newSigned64
-
newUnsigned64
-
convertParameter
Deprecated. -
slice
-
checkBounds
-
findType
-
findType
-
parseByteOrder
-
roundUpToPowerOfTwo
public static int roundUpToPowerOfTwo(int v)
-