Class Util

java.lang.Object
org.jruby.ext.ffi.Util

public final class Util extends Object
  • Method Details

    • int8Value

      public static final byte int8Value(IRubyObject parameter)
    • uint8Value

      public static final short uint8Value(IRubyObject parameter)
    • int16Value

      public static final short int16Value(IRubyObject parameter)
    • uint16Value

      public static final int uint16Value(IRubyObject parameter)
    • int32Value

      public static final int int32Value(IRubyObject parameter)
    • uint32Value

      public static final long uint32Value(IRubyObject parameter)
    • int64Value

      public static final long int64Value(IRubyObject parameter)
    • uint64Value

      public static final long uint64Value(IRubyObject parameter)
    • floatValue

      @Deprecated(since="10.0") public static final float floatValue(IRubyObject parameter)
      Deprecated.
    • floatValue

      public static final float floatValue(ThreadContext context, IRubyObject parameter)
    • doubleValue

      @Deprecated(since="10.0") public static final double doubleValue(IRubyObject parameter)
      Deprecated.
    • doubleValue

      public static final double doubleValue(ThreadContext context, IRubyObject parameter)
    • longValue

      public static final long longValue(IRubyObject parameter)
      Converts characters like 'a' or 't' to an integer value
      Parameters:
      parameter -
      Returns:
    • intValue

      @Deprecated(since="10.0") public static int intValue(IRubyObject obj, RubyHash enums)
      Deprecated.
    • ulongValue

      public static final long ulongValue(IRubyObject parameter)
    • newSigned8

      public static final IRubyObject newSigned8(Ruby runtime, byte value)
    • newUnsigned8

      public static final IRubyObject newUnsigned8(Ruby runtime, byte value)
    • newSigned16

      public static final IRubyObject newSigned16(Ruby runtime, short value)
    • newUnsigned16

      public static final IRubyObject newUnsigned16(Ruby runtime, short value)
    • newSigned32

      public static final IRubyObject newSigned32(Ruby runtime, int value)
    • newUnsigned32

      public static final IRubyObject newUnsigned32(Ruby runtime, int value)
    • newSigned64

      public static final IRubyObject newSigned64(Ruby runtime, long value)
    • newUnsigned64

      public static final IRubyObject newUnsigned64(Ruby runtime, long value)
    • convertParameter

      @Deprecated public static final <T> T convertParameter(IRubyObject parameter, Class<T> paramClass)
      Deprecated.
    • slice

      public static final ByteBuffer slice(ByteBuffer buf, int offset)
    • checkBounds

      public static final void checkBounds(Ruby runtime, long size, long off, long len)
    • findType

      public static Type findType(ThreadContext context, IRubyObject name)
    • findType

      public static Type findType(ThreadContext context, IRubyObject name, IRubyObject typeMap)
    • parseByteOrder

      public static ByteOrder parseByteOrder(Ruby runtime, IRubyObject byte_order)
    • roundUpToPowerOfTwo

      public static int roundUpToPowerOfTwo(int v)