Class JavaDispatcher.Dispatcher.ForStaticMethod

    • Field Detail

      • method

        private final java.lang.reflect.Method method
        The proxied method.
    • Constructor Detail

      • ForStaticMethod

        protected ForStaticMethod​(java.lang.reflect.Method method)
        Creates a dispatcher for invoking a static method.
        Parameters:
        method - The proxied method.
    • Method Detail

      • invoke

        @MaybeNull
        public java.lang.Object invoke​(java.lang.Object[] argument)
                                throws java.lang.Throwable
        Invokes the proxied action.
        Specified by:
        invoke in interface JavaDispatcher.Dispatcher
        Parameters:
        argument - The arguments provided.
        Returns:
        The return value.
        Throws:
        java.lang.Throwable - If any error occurs.
      • apply

        public int apply​(org.objectweb.asm.MethodVisitor methodVisitor,
                         java.lang.reflect.Method method)
        Implements this dispatcher in a generated proxy.
        Specified by:
        apply in interface JavaDispatcher.Dispatcher
        Parameters:
        methodVisitor - The method visitor to implement the method with.
        method - The method being implemented.
        Returns:
        The maximal size of the operand stack.