|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.kenai.jffi.Function
public final class Function
Native function invocation context This class holds all the information that JFFI needs to correctly call a native function.
Constructor Summary | |
---|---|
Function(long address,
Type returnType,
Type... paramTypes)
Creates a new instance of Function with default calling convention. |
|
Function(long address,
Type returnType,
Type[] paramTypes,
CallingConvention convention)
Creates a new instance of Function. |
|
Function(long address,
Type returnType,
Type[] paramTypes,
CallingConvention convention,
boolean saveErrno)
Creates a new instance of Function. |
Method Summary | |
---|---|
void |
dispose()
|
protected void |
finalize()
|
long |
getFunctionAddress()
Gets the address of the function. |
int |
getParameterCount()
Gets the number of parameters the native function accepts. |
Type |
getParameterType(int index)
Gets the type of a parameter. |
int |
getRawParameterSize()
Gets the number of bytes required to pack all the parameters this function accepts, into a region of memory. |
Type |
getReturnType()
Gets the native return type of this function. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Function(long address, Type returnType, Type... paramTypes)
address
- The native address of the function to invoke.returnType
- The return type of the native function.paramTypes
- The parameter types the function accepts.public Function(long address, Type returnType, Type[] paramTypes, CallingConvention convention)
address
- The native address of the function to invoke.returnType
- The return type of the native function.paramTypes
- The parameter types the function accepts.convention
- The calling convention of the function.public Function(long address, Type returnType, Type[] paramTypes, CallingConvention convention, boolean saveErrno)
address
- The native address of the function to invoke.returnType
- The return type of the native function.paramTypes
- The parameter types the function accepts.convention
- The calling convention of the function.saveErrno
- Whether the errno should be saved or notMethod Detail |
---|
public final int getParameterCount()
getParameterCount
in interface CallInfo
public final int getRawParameterSize()
getRawParameterSize
in interface CallInfo
public final long getFunctionAddress()
public final Type getReturnType()
getReturnType
in interface CallInfo
public final Type getParameterType(int index)
getParameterType
in interface CallInfo
index
- The index of the parameter in the function signature
public final void dispose()
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |