Package com.kenai.jffi
Class CallContextCache
- java.lang.Object
-
- com.kenai.jffi.CallContextCache
-
public class CallContextCache extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
CallContextCache.CallContextRef
private static class
CallContextCache.Signature
private static class
CallContextCache.SingletonHolder
Holder class to do lazy allocation of the ClosureManager instance
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<CallContextCache.Signature,CallContextCache.CallContextRef>
contextCache
private java.lang.ref.ReferenceQueue<CallContext>
contextReferenceQueue
-
Constructor Summary
Constructors Modifier Constructor Description private
CallContextCache()
Constructs a ClosureManager
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CallContext
getCallContext(Type returnType, int fixedParamCount, Type[] parameterTypes, CallingConvention convention, boolean saveErrno)
CallContext
getCallContext(Type returnType, int fixedParamCount, Type[] parameterTypes, CallingConvention convention, boolean saveErrno, boolean faultProtect)
CallContext
getCallContext(Type returnType, Type[] parameterTypes, CallingConvention convention)
CallContext
getCallContext(Type returnType, Type[] parameterTypes, CallingConvention convention, boolean saveErrno)
CallContext
getCallContext(Type returnType, Type[] parameterTypes, CallingConvention convention, boolean saveErrno, boolean faultProtect)
static CallContextCache
getInstance()
Gets the global instance of theCallContextCache
-
-
-
Field Detail
-
contextCache
private final java.util.Map<CallContextCache.Signature,CallContextCache.CallContextRef> contextCache
-
contextReferenceQueue
private final java.lang.ref.ReferenceQueue<CallContext> contextReferenceQueue
-
-
Method Detail
-
getInstance
public static CallContextCache getInstance()
Gets the global instance of theCallContextCache
- Returns:
- An instance of a
CallContextCache
-
getCallContext
public final CallContext getCallContext(Type returnType, Type[] parameterTypes, CallingConvention convention)
-
getCallContext
public final CallContext getCallContext(Type returnType, Type[] parameterTypes, CallingConvention convention, boolean saveErrno)
-
getCallContext
public final CallContext getCallContext(Type returnType, int fixedParamCount, Type[] parameterTypes, CallingConvention convention, boolean saveErrno)
-
getCallContext
public final CallContext getCallContext(Type returnType, Type[] parameterTypes, CallingConvention convention, boolean saveErrno, boolean faultProtect)
-
getCallContext
public final CallContext getCallContext(Type returnType, int fixedParamCount, Type[] parameterTypes, CallingConvention convention, boolean saveErrno, boolean faultProtect)
-
-