Package com.sun.jna
Klasse CallbackReference
- Alle implementierten Schnittstellen:
Closeable
,AutoCloseable
Provides a reference to an association between a native callback closure
and a Java
Callback
closure.-
Verschachtelte Klassen - Übersicht
Modifizierer und TypKlasseBeschreibung(Package privat) static class
-
Feldübersicht
Modifizierer und TypFeldBeschreibung(Package privat) static final Map
<Callback, CallbackReference> (Package privat) int
(Package privat) Pointer
(Package privat) Cleaner.Cleanable
(Package privat) static final Map
<Callback, CallbackReference> (Package privat) Method
(Package privat) CallbackProxy
(Package privat) Pointer
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
close()
Free native resources associated with this callback.protected void
dispose()
Veraltet.(Package privat) static void
Dispose of all memory allocated for callbacks.(Package privat) static Class
<?> findCallbackClass
(Class<?> type) static Callback
getCallback
(Class<?> type, Pointer p) Return a Callback associated with the given function pointer.static Pointer
Return aPointer
to the native function address for the given callback.Obtain a pointer to the native glue code for this callback.(Package privat) static CallbackThreadInitializer
setCallbackThreadInitializer
(Callback cb, CallbackThreadInitializer initializer) Von Klasse geerbte Methoden java.lang.ref.Reference
clear, clone, enqueue, get, isEnqueued, reachabilityFence, refersTo
-
Felddetails
-
callbackMap
-
directCallbackMap
-
pointerCallbackMap
-
allocations
-
cleanable
Cleaner.Cleanable cleanable -
cbstruct
Pointer cbstruct -
trampoline
Pointer trampoline -
proxy
CallbackProxy proxy -
method
Method method -
callingConvention
int callingConvention
-
-
Methodendetails
-
setCallbackThreadInitializer
static CallbackThreadInitializer setCallbackThreadInitializer(Callback cb, CallbackThreadInitializer initializer) - Parameter:
cb
- TheCallback
instanceinitializer
- TheCallbackThreadInitializer
- ifnull
then the associated initializer instance is removed- Gibt zurück:
- The previous initializer instance (may be
null
)
-
getCallback
Return a Callback associated with the given function pointer. If the pointer refers to a Java callback trampoline, return the original Java Callback. Otherwise, return a proxy to the native function pointer.- Löst aus:
IllegalStateException
- if the given pointer has already been mapped to a callback of a different type.
-
findCallbackClass
-
getTrampoline
Obtain a pointer to the native glue code for this callback. -
close
public void close()Free native resources associated with this callback.- Angegeben von:
close
in SchnittstelleAutoCloseable
- Angegeben von:
close
in SchnittstelleCloseable
-
dispose
Veraltet. -
disposeAll
static void disposeAll()Dispose of all memory allocated for callbacks. -
getFunctionPointer
Return aPointer
to the native function address for the given callback.
-