|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kenai.jffi.CallContext
public final class CallContext
Native function call context This class holds all the information that JFFI needs to correctly call a native function, or to implement a callback from native code to java.
| Constructor Summary | |
|---|---|
CallContext(Type returnType,
Type... parameterTypes)
Creates a new instance of Function with default calling convention. |
|
CallContext(Type returnType,
Type[] parameterTypes,
CallingConvention convention)
Creates a new instance of Function. |
|
CallContext(Type returnType,
Type[] parameterTypes,
CallingConvention convention,
boolean saveErrno)
|
|
| Method Summary | |
|---|---|
void |
dispose()
Deprecated. |
boolean |
equals(Object o)
|
protected void |
finalize()
|
static CallContext |
getCallContext(Type returnType,
Type[] parameterTypes,
CallingConvention convention,
boolean saveErrno)
Returns a CallContext instance. |
static CallContext |
getCallContext(Type returnType,
Type[] parameterTypes,
CallingConvention convention,
boolean saveErrno,
boolean faultProtect)
|
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. |
int |
hashCode()
|
| Methods inherited from class java.lang.Object |
|---|
clone, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CallContext(Type returnType,
Type... parameterTypes)
returnType - The return type of the native function.parameterTypes - The parameter types the function accepts.
public CallContext(Type returnType,
Type[] parameterTypes,
CallingConvention convention)
returnType - The return type of the native function.parameterTypes - The parameter types the function accepts.convention - The calling convention of the function.
public CallContext(Type returnType,
Type[] parameterTypes,
CallingConvention convention,
boolean saveErrno)
| Method Detail |
|---|
public static CallContext getCallContext(Type returnType,
Type[] parameterTypes,
CallingConvention convention,
boolean saveErrno)
CallContext instance. This may return a previously cached instance that matches
the signature requested, and should be used in preference to instantiating new instances.
returnType - The return type of the native function.parameterTypes - The parameter types the function accepts.convention - The calling convention of the function.saveErrno - Indicates that the errno should be saved
public static CallContext getCallContext(Type returnType,
Type[] parameterTypes,
CallingConvention convention,
boolean saveErrno,
boolean faultProtect)
public final int getParameterCount()
public final int getRawParameterSize()
public final Type getReturnType()
public final Type getParameterType(int index)
index - The index of the parameter in the function signature
public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Object@Deprecated public final void dispose()
protected void finalize()
throws Throwable
finalize in class ObjectThrowable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||