Class ClosurePool.Proxy

  • Enclosing class:
    ClosurePool

    static final class ClosurePool.Proxy
    extends java.lang.Object
    This is a proxy passed to the native code, to be called by the native trampoline code.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) CallContext callContext
      Keep references to the return and parameter types so they do not get garbage collected until the closure does.
      (package private) Closure closure  
      (package private) static java.lang.reflect.Method METHOD  
    • Constructor Summary

      Constructors 
      Constructor Description
      Proxy​(CallContext callContext)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private static java.lang.reflect.Method getMethod()
      Gets the Method to be invoked by native code
      void invoke​(long retvalAddress, long paramAddress)
      Invoked by the native closure trampoline to execute the java side of the closure.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • METHOD

        static final java.lang.reflect.Method METHOD
      • callContext

        final CallContext callContext
        Keep references to the return and parameter types so they do not get garbage collected until the closure does.
      • closure

        volatile Closure closure
    • Method Detail

      • getMethod

        private static java.lang.reflect.Method getMethod()
        Gets the Method to be invoked by native code
        Returns:
        The method to be invoked by native code
      • invoke

        public void invoke​(long retvalAddress,
                           long paramAddress)
        Invoked by the native closure trampoline to execute the java side of the closure.
        Parameters:
        retvalAddress - The address of the native return value buffer
        paramAddress - The address of the native parameter buffer.