Modifier and Type | Class and Description |
---|---|
(package private) static class |
CallbackReference.AttachOptions |
Modifier and Type | Field and Description |
---|---|
(package private) static java.util.Map<java.lang.Object,java.lang.Object> |
allocations |
(package private) static java.util.Map<Callback,CallbackReference> |
callbackMap |
(package private) int |
callingConvention |
(package private) Pointer |
cbstruct |
(package private) static java.util.Map<Callback,CallbackReference> |
directCallbackMap |
(package private) java.lang.reflect.Method |
method |
(package private) static java.util.Map<Pointer,java.lang.ref.Reference<Callback>> |
pointerCallbackMap |
(package private) CallbackProxy |
proxy |
(package private) Pointer |
trampoline |
Modifier and Type | Method and Description |
---|---|
protected void |
dispose()
Free native resources associated with this callback.
|
(package private) static void |
disposeAll()
Dispose of all memory allocated for callbacks.
|
protected void |
finalize()
Free native resources associated with this callback when GC'd.
|
(package private) static java.lang.Class<?> |
findCallbackClass(java.lang.Class<?> type) |
static Callback |
getCallback(java.lang.Class<?> type,
Pointer p)
Return a Callback associated with the given function pointer.
|
static Pointer |
getFunctionPointer(Callback cb)
Return a
Pointer to the native function address for the
given callback. |
Pointer |
getTrampoline()
Obtain a pointer to the native glue code for this callback.
|
(package private) static CallbackThreadInitializer |
setCallbackThreadInitializer(Callback cb,
CallbackThreadInitializer initializer) |
static final java.util.Map<Callback,CallbackReference> callbackMap
static final java.util.Map<Callback,CallbackReference> directCallbackMap
static final java.util.Map<Pointer,java.lang.ref.Reference<Callback>> pointerCallbackMap
static final java.util.Map<java.lang.Object,java.lang.Object> allocations
Pointer cbstruct
Pointer trampoline
CallbackProxy proxy
java.lang.reflect.Method method
int callingConvention
static CallbackThreadInitializer setCallbackThreadInitializer(Callback cb, CallbackThreadInitializer initializer)
cb
- The Callback
instanceinitializer
- The CallbackThreadInitializer
- if null
then the
associated initializer instance is removednull
)public static Callback getCallback(java.lang.Class<?> type, Pointer p)
java.lang.IllegalStateException
- if the given pointer has already been
mapped to a callback of a different type.static java.lang.Class<?> findCallbackClass(java.lang.Class<?> type)
public Pointer getTrampoline()
protected void finalize()
finalize
in class java.lang.Object
protected void dispose()
static void disposeAll()