|
JNA API> 4.0.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.ref.Reference<T> java.lang.ref.WeakReference com.sun.jna.CallbackReference
class CallbackReference
Provides a reference to an association between a native callback closure
and a Java Callback
closure.
Nested Class Summary | |
---|---|
(package private) static class |
CallbackReference.AttachOptions
|
Field Summary | |
---|---|
(package private) static Map |
allocations
|
(package private) static Map |
callbackMap
|
(package private) Pointer |
cbstruct
|
(package private) static Map |
directCallbackMap
|
(package private) Method |
method
|
(package private) static Map |
pointerCallbackMap
|
(package private) CallbackProxy |
proxy
|
(package private) Pointer |
trampoline
|
Method Summary | |
---|---|
protected void |
dispose()
Free native resources associated with this callback. |
protected void |
finalize()
Free native resources associated with this callback when GC'd. |
(package private) static Class |
findCallbackClass(Class type)
Find the first instance of an interface which implements the Callback interface or an interface derived from Callback, which defines an appropriate callback method. |
static Callback |
getCallback(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 void |
setCallbackThreadInitializer(Callback cb,
CallbackThreadInitializer initializer)
|
Methods inherited from class java.lang.ref.Reference |
---|
clear, enqueue, get, isEnqueued |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final Map callbackMap
static final Map directCallbackMap
static final Map pointerCallbackMap
static final Map allocations
Pointer cbstruct
Pointer trampoline
CallbackProxy proxy
Method method
Method Detail |
---|
static void setCallbackThreadInitializer(Callback cb, CallbackThreadInitializer initializer)
public static Callback getCallback(Class type, Pointer p)
IllegalStateException
- if the given pointer has already been
mapped to a callback of a different type.static Class findCallbackClass(Class type)
public Pointer getTrampoline()
protected void finalize()
finalize
in class Object
protected void dispose()
public static Pointer getFunctionPointer(Callback cb)
Pointer
to the native function address for the
given callback.
|
JNA API> 4.0.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |