JNA API 3.0.3
com.sun.jna

Class CallbackReference



  •  class CallbackReference
    extends java.lang.ref.WeakReference
    Provides a reference to an association between a native callback closure and a Java Callback closure.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      protected void finalize()
      Free native resources associated with this callback.
      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.
      • 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

      • callbackMap

        static final java.util.Map callbackMap
      • altCallbackMap

        static final java.util.Map altCallbackMap
    • Method Detail

      • getCallback

        public static Callback getCallback(java.lang.Class type,
                           Pointer p)
        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.
      • getTrampoline

        public Pointer getTrampoline()
        Obtain a pointer to the native glue code for this callback.
      • finalize

        protected void finalize()
        Free native resources associated with this callback.
        Overrides:
        finalize in class java.lang.Object
      • getFunctionPointer

        public static Pointer getFunctionPointer(Callback cb)
        Return a Pointer to the native function address for the given callback.
JNA API 3.0.3

Copyright © 2007-2008 Timothy Wall. All Rights Reserved.