public class NativeCallbackFactory
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private RubyClass |
callbackClass |
private CallbackInfo |
callbackInfo |
private CachingCallSite |
callSite |
private NativeFunctionInfo |
closureInfo |
private com.kenai.jffi.ClosurePool |
closurePool |
private WeakIdentityHashMap |
closures |
private Ruby |
runtime |
| Constructor and Description |
|---|
NativeCallbackFactory(Ruby runtime,
CallbackInfo cbInfo) |
| Modifier and Type | Method and Description |
|---|---|
Pointer |
getCallback(IRubyObject callable,
CachingCallSite callSite) |
Pointer |
getCallback(RubyObject callable) |
private Pointer |
getCallbackPointer(IRubyObject callable,
CachingCallSite callSite) |
private static boolean |
isParameterTypeValid(Type type)
Checks if a type is a valid parameter type for a callback
|
private static boolean |
isReturnTypeValid(Type type)
Checks if a type is a valid callback return type
|
(package private) NativeCallbackPointer |
newCallback(IRubyObject callable,
CachingCallSite callSite) |
(package private) NativeCallbackPointer |
newCallback(java.lang.Object callable) |
private NativeFunctionInfo |
newFunctionInfo(Ruby runtime,
CallbackInfo cbInfo) |
private final WeakIdentityHashMap closures
private final Ruby runtime
private final com.kenai.jffi.ClosurePool closurePool
private final NativeFunctionInfo closureInfo
private final CallbackInfo callbackInfo
private final RubyClass callbackClass
private final CachingCallSite callSite
public NativeCallbackFactory(Ruby runtime, CallbackInfo cbInfo)
public final Pointer getCallback(RubyObject callable)
public final Pointer getCallback(IRubyObject callable, CachingCallSite callSite)
private Pointer getCallbackPointer(IRubyObject callable, CachingCallSite callSite)
NativeCallbackPointer newCallback(IRubyObject callable, CachingCallSite callSite)
NativeCallbackPointer newCallback(java.lang.Object callable)
private final NativeFunctionInfo newFunctionInfo(Ruby runtime, CallbackInfo cbInfo)
private static final boolean isReturnTypeValid(Type type)
type - The type to examineprivate static final boolean isParameterTypeValid(Type type)
type - The type to examine