org.jruby.ext.ffi
Enum NativeType

java.lang.Object
  extended by java.lang.Enum<NativeType>
      extended by org.jruby.ext.ffi.NativeType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<NativeType>, NativeParam

public enum NativeType
extends java.lang.Enum<NativeType>
implements NativeParam

Native types


Enum Constant Summary
ARRAY
           
BOOL
           
BUFFER_IN
           
BUFFER_INOUT
           
BUFFER_OUT
           
CHAR
           
CHAR_ARRAY
           
DOUBLE
           
FLOAT
           
INT
           
LONG
          A C long type
LONG_LONG
           
POINTER
           
RBXSTRING
          A Rubinus :string arg - copies data both ways, and nul terminates
SHORT
           
STRING
          An immutable string.
STRUCT
           
UCHAR
           
UINT
           
ULONG
          A C unsigned long
ULONG_LONG
           
USHORT
           
VARARGS
           
VOID
           
 
Method Summary
 NativeType getNativeType()
           
 int intValue()
           
static NativeType valueOf(int type)
           
static NativeType valueOf(IRubyObject type)
           
static NativeType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static NativeType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

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

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


RBXSTRING

public static final NativeType RBXSTRING
A Rubinus :string arg - copies data both ways, and nul terminates


VARARGS

public static final NativeType VARARGS

ARRAY

public static final NativeType ARRAY

STRUCT

public static final NativeType STRUCT
Method Detail

values

public static NativeType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (NativeType c : NativeType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static NativeType valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

intValue

public final int intValue()

getNativeType

public final NativeType getNativeType()
Specified by:
getNativeType in interface NativeParam

valueOf

public static final NativeType valueOf(int type)

valueOf

public static final NativeType valueOf(IRubyObject type)


Copyright © 2002-2009 JRuby Team. All Rights Reserved.