Enum NativeType

java.lang.Object
java.lang.Enum<NativeType>
org.jruby.ext.ffi.NativeType
All Implemented Interfaces:
Serializable, Comparable<NativeType>, java.lang.constant.Constable

public enum NativeType extends Enum<NativeType>
Native types
  • Enum Constant Details

    • VOID

      public static final NativeType VOID
    • BOOL

      public static final NativeType BOOL
    • CHAR

      public static final NativeType CHAR
    • UCHAR

      public static final NativeType UCHAR
    • SHORT

      public static final NativeType SHORT
    • USHORT

      public static final NativeType USHORT
    • INT

      public static final NativeType INT
    • UINT

      public static final NativeType UINT
    • LONG_LONG

      public static final NativeType LONG_LONG
    • ULONG_LONG

      public static final NativeType ULONG_LONG
    • LONG

      public static final NativeType LONG
      A C long type
    • ULONG

      public static final NativeType ULONG
      A C unsigned long
    • FLOAT

      public static final NativeType FLOAT
    • DOUBLE

      public static final NativeType DOUBLE
    • LONGDOUBLE

      public static final NativeType LONGDOUBLE
    • POINTER

      public static final NativeType POINTER
    • BUFFER_IN

      public static final NativeType BUFFER_IN
    • BUFFER_OUT

      public static final NativeType BUFFER_OUT
    • BUFFER_INOUT

      public static final NativeType BUFFER_INOUT
    • CHAR_ARRAY

      public static final NativeType CHAR_ARRAY
    • STRING

      public static final NativeType STRING
      An immutable string. Nul terminated, but only copies in to the native function
    • TRANSIENT_STRING

      public static final NativeType TRANSIENT_STRING
    • VARARGS

      public static final NativeType VARARGS
    • ARRAY

      public static final NativeType ARRAY
    • STRUCT

      public static final NativeType STRUCT
    • MAPPED

      public static final NativeType MAPPED
  • Constructor Details

    • NativeType

      private NativeType()
  • Method Details

    • values

      public static NativeType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static NativeType valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • intValue

      public final int intValue()
    • valueOf

      public static final NativeType valueOf(IRubyObject type)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      type - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null