Package net.bytebuddy.utility.dispatcher
Interface JavaDispatcher.Dispatcher
-
- All Known Implementing Classes:
JavaDispatcher.Dispatcher.ForConstructor
,JavaDispatcher.Dispatcher.ForContainerCreation
,JavaDispatcher.Dispatcher.ForDefaultValue
,JavaDispatcher.Dispatcher.ForDefaultValue.OfNonPrimitiveArray
,JavaDispatcher.Dispatcher.ForDefaultValue.OfPrimitiveArray
,JavaDispatcher.Dispatcher.ForInstanceCheck
,JavaDispatcher.Dispatcher.ForNonStaticMethod
,JavaDispatcher.Dispatcher.ForStaticMethod
,JavaDispatcher.Dispatcher.ForUnresolvedMethod
- Enclosing class:
- JavaDispatcher<T>
protected static interface JavaDispatcher.Dispatcher
A dispatcher for handling a proxied method.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
JavaDispatcher.Dispatcher.ForConstructor
A dispatcher for invoking a constructor.static class
JavaDispatcher.Dispatcher.ForContainerCreation
A dispatcher that creates an array.static class
JavaDispatcher.Dispatcher.ForDefaultValue
A dispatcher that returns a fixed value.static class
JavaDispatcher.Dispatcher.ForInstanceCheck
A dispatcher that performs an instance check.static class
JavaDispatcher.Dispatcher.ForNonStaticMethod
A dispatcher for invoking a non-static proxied method.static class
JavaDispatcher.Dispatcher.ForStaticMethod
A dispatcher for invoking a static proxied method.static class
JavaDispatcher.Dispatcher.ForUnresolvedMethod
A dispatcher for an unresolved method.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
apply(org.objectweb.asm.MethodVisitor methodVisitor, java.lang.reflect.Method method)
Implements this dispatcher in a generated proxy.java.lang.Object
invoke(java.lang.Object[] argument)
Invokes the proxied action.
-
-
-
Method Detail
-
invoke
@MaybeNull java.lang.Object invoke(java.lang.Object[] argument) throws java.lang.Throwable
Invokes the proxied action.- Parameters:
argument
- The arguments provided.- Returns:
- The return value.
- Throws:
java.lang.Throwable
- If any error occurs.
-
apply
int apply(org.objectweb.asm.MethodVisitor methodVisitor, java.lang.reflect.Method method)
Implements this dispatcher in a generated proxy.- Parameters:
methodVisitor
- The method visitor to implement the method with.method
- The method being implemented.- Returns:
- The maximal size of the operand stack.
-
-