com.kenai.jffi
Class Type

java.lang.Object
  extended by com.kenai.jffi.Type
Direct Known Subclasses:
Aggregate

public abstract class Type
extends java.lang.Object

Native parameter and return types.


Field Summary
protected  int align
          The minimum alignment of this type
static Type DOUBLE
          The native double type
static Type FLOAT
          The native float type
protected  long handle
          The address of this type's ffi_type structure
static Type LONGDOUBLE
          The native long double type
static Type POINTER
          The native memory address type
static Type SCHAR
          The native signed char type
static Type SINT
          The native signed integer type
static Type SINT16
          The native signed 16 bit integer type
static Type SINT32
          The native signed 32 bit integer type
static Type SINT64
          The native signed 64 bit integer type
static Type SINT8
          The native signed 8 bit integer type
protected  int size
          The size in bytes of this type
static Type SLONG
          The native signed long integer type
static Type SSHORT
          The native signed short integer type
protected  int type
          The FFI type of this type
static Type UCHAR
          The native unsigned char type
static Type UINT
          The native unsigned integer type
static Type UINT16
          The native unsigned 16 bit integer type
static Type UINT32
          The native unsigned 32 bit integer type
static Type UINT64
          The native unsigned 64 bit integer type
static Type UINT8
          The native unsigned 8 bit integer type
static Type ULONG
          The native unsigned long integer type
static Type USHORT
          The native unsigned short integer type
static Type VOID
          The native void type
 
Method Summary
 int alignment()
          Gets the alignment of this type.
 boolean equals(java.lang.Object obj)
           
 int hashCode()
           
 int size()
          Gets the size of this type.
 int type()
          Gets the FFI type enum value for this Type
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VOID

public static final Type VOID
The native void type


FLOAT

public static final Type FLOAT
The native float type


DOUBLE

public static final Type DOUBLE
The native double type


LONGDOUBLE

public static final Type LONGDOUBLE
The native long double type


UINT8

public static final Type UINT8
The native unsigned 8 bit integer type


SINT8

public static final Type SINT8
The native signed 8 bit integer type


UINT16

public static final Type UINT16
The native unsigned 16 bit integer type


SINT16

public static final Type SINT16
The native signed 16 bit integer type


UINT32

public static final Type UINT32
The native unsigned 32 bit integer type


SINT32

public static final Type SINT32
The native signed 32 bit integer type


UINT64

public static final Type UINT64
The native unsigned 64 bit integer type


SINT64

public static final Type SINT64
The native signed 64 bit integer type


POINTER

public static final Type POINTER
The native memory address type


UCHAR

public static final Type UCHAR
The native unsigned char type


SCHAR

public static final Type SCHAR
The native signed char type


USHORT

public static final Type USHORT
The native unsigned short integer type


SSHORT

public static final Type SSHORT
The native signed short integer type


UINT

public static final Type UINT
The native unsigned integer type


SINT

public static final Type SINT
The native signed integer type


ULONG

public static final Type ULONG
The native unsigned long integer type


SLONG

public static final Type SLONG
The native signed long integer type


type

protected final int type
The FFI type of this type


size

protected final int size
The size in bytes of this type


align

protected final int align
The minimum alignment of this type


handle

protected final long handle
The address of this type's ffi_type structure

Method Detail

type

public int type()
Gets the FFI type enum value for this Type

Returns:
An integer representing the FFI type.

size

public final int size()
Gets the size of this type.

Returns:
The size of this type, in bytes.

alignment

public final int alignment()
Gets the alignment of this type.

Returns:
The alignment of this type, in bytes.

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object