Package net.bytebuddy.utility.dispatcher
Class JavaDispatcher.Dispatcher.ForNonStaticMethod
java.lang.Object
net.bytebuddy.utility.dispatcher.JavaDispatcher.Dispatcher.ForNonStaticMethod
- All Implemented Interfaces:
JavaDispatcher.Dispatcher
- Enclosing interface:
- JavaDispatcher.Dispatcher
@Enhance
public static class JavaDispatcher.Dispatcher.ForNonStaticMethod
extends Object
implements JavaDispatcher.Dispatcher
A dispatcher for invoking a non-static proxied method.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.utility.dispatcher.JavaDispatcher.Dispatcher
JavaDispatcher.Dispatcher.ForConstructor, JavaDispatcher.Dispatcher.ForContainerCreation, JavaDispatcher.Dispatcher.ForDefaultValue, JavaDispatcher.Dispatcher.ForInstanceCheck, JavaDispatcher.Dispatcher.ForNonStaticMethod, JavaDispatcher.Dispatcher.ForStaticMethod, JavaDispatcher.Dispatcher.ForUnresolvedMethod
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ForNonStaticMethod
(Method method) Creates a dispatcher for invoking a non-static method. -
Method Summary
-
Field Details
-
NO_ARGUMENTS
Indicates a call without arguments. -
method
The proxied method.
-
-
Constructor Details
-
ForNonStaticMethod
Creates a dispatcher for invoking a non-static method.- Parameters:
method
- The proxied method.
-
-
Method Details
-
invoke
Invokes the proxied action.- Specified by:
invoke
in interfaceJavaDispatcher.Dispatcher
- Parameters:
argument
- The arguments provided.- Returns:
- The return value.
- Throws:
Throwable
- If any error occurs.
-
apply
Implements this dispatcher in a generated proxy.- Specified by:
apply
in interfaceJavaDispatcher.Dispatcher
- Parameters:
methodVisitor
- The method visitor to implement the method with.method
- The method being implemented.- Returns:
- The maximal size of the operand stack.
-