Logo Search packages:      
Sourcecode: libjna-java version File versions  Download package

com::sun::jna::Function Class Reference

Inheritance diagram for com::sun::jna::Function:

com::sun::jna::Pointer

List of all members.


Detailed Description

An abstraction for a native function pointer. An instance of Function represents a pointer to some native function. invoke(Class,Object[],Map) is the primary means to call the function.

Author:
Sheng Liang, originator

Todd Fast, suitability modifications

See also:
Pointer

Definition at line 29 of file Function.java.


Public Member Functions

boolean equals (Object o)
byte getByte (long offset)
byte[] getByteArray (long offset, int arraySize)
ByteBuffer getByteBuffer (long offset, long length)
int getCallingConvention ()
char getChar (long offset)
char[] getCharArray (long offset, int arraySize)
double getDouble (long offset)
double[] getDoubleArray (long offset, int arraySize)
float getFloat (long offset)
float[] getFloatArray (long offset, int arraySize)
int getInt (long offset)
int[] getIntArray (long offset, int arraySize)
long getLong (long offset)
long[] getLongArray (long offset, int arraySize)
String getName ()
NativeLong getNativeLong (long offset)
Pointer getPointer (long offset)
Pointer[] getPointerArray (long offset, int arraySize)
short getShort (long offset)
short[] getShortArray (long offset, int arraySize)
String getString (long offset)
String getString (long offset, boolean wide)
int hashCode ()
long indexOf (long offset, byte value)
void invoke (Object[] args)
Object invoke (Class returnType, Object[] inArgs, Map options)
Object invoke (Class returnType, Object[] inArgs)
double invokeDouble (Object[] args)
float invokeFloat (Object[] args)
int invokeInt (Object[] args)
long invokeLong (Object[] args)
Pointer invokePointer (Object[] args)
String invokeString (Object[] args, boolean wide)
void invokeVoid (Object[] args)
void read (long offset, Pointer[] buf, int index, int length)
void read (long offset, double[] buf, int index, int length)
void read (long offset, float[] buf, int index, int length)
void read (long offset, long[] buf, int index, int length)
void read (long offset, int[] buf, int index, int length)
void read (long offset, char[] buf, int index, int length)
void read (long offset, short[] buf, int index, int length)
void read (long offset, byte[] buf, int index, int length)
void setByte (long offset, byte value)
void setChar (long offset, char value)
void setDouble (long offset, double value)
void setFloat (long offset, float value)
void setInt (long offset, int value)
void setLong (long offset, long value)
void setMemory (long offset, long length, byte value)
void setNativeLong (long offset, NativeLong value)
void setPointer (long offset, Pointer value)
void setShort (long offset, short value)
void setString (long offset, String value)
void setString (long offset, String value, boolean wide)
Pointer share (long offset, long sz)
Pointer share (long offset)
String toString ()
void write (long bOff, Pointer[] buf, int index, int length)
void write (long offset, double[] buf, int index, int length)
void write (long offset, float[] buf, int index, int length)
void write (long offset, long[] buf, int index, int length)
void write (long offset, int[] buf, int index, int length)
void write (long offset, char[] buf, int index, int length)
void write (long offset, short[] buf, int index, int length)
void write (long offset, byte[] buf, int index, int length)

Static Public Member Functions

static final Pointer createConstant (long peer)
static Function getFunction (String libraryName, String functionName, int callConvention)
static Function getFunction (String libraryName, String functionName)

Static Public Attributes

static final int ALT_CONVENTION = 1
static final int C_CONVENTION = 0
static final int MAX_NARGS = 256
static final Pointer NULL = null
static final int SIZE

Package Functions

void clear (long size)
 Function (Pointer functionAddress, int callingConvention)
 Function (NativeLibrary library, String functionName, int callingConvention)
Object invoke (Object[] args, Class returnType)

Static Package Functions

 [static initializer]
static Object[] concatenateVarArgs (Object[] inArgs)
static boolean isVarArgs (Method m)
static Boolean valueOf (boolean b)

Package Attributes

long peer

Static Package Attributes

static final String OPTION_INVOKING_METHOD = "invoking-method"

Private Member Functions

void checkCallingConvention (int convention) throws IllegalArgumentException
Object convertArgument (Object[] args, int index, Method invokingMethod, TypeMapper mapper)
native double invokeDouble (int callingConvention, Object[] args)
native float invokeFloat (int callingConvention, Object[] args)
native int invokeInt (int callingConvention, Object[] args)
native long invokeLong (int callingConvention, Object[] args)
native Pointer invokePointer (int callingConvention, Object[] args)
String invokeString (int callingConvention, Object[] args, boolean wide)
native Structure invokeStructure (int callingConvention, Object[] args, Structure result)
native void invokeVoid (int callingConvention, Object[] args)
boolean isPrimitiveArray (Class argClass)

Private Attributes

int callingConvention
String functionName
NativeLibrary library

Classes

class  PointerArray
interface  PostCallRead

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index