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.DispatcherA dispatcher for handling a proxied method.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classJavaDispatcher.Dispatcher.ForConstructorA dispatcher for invoking a constructor.static classJavaDispatcher.Dispatcher.ForContainerCreationA dispatcher that creates an array.static classJavaDispatcher.Dispatcher.ForDefaultValueA dispatcher that returns a fixed value.static classJavaDispatcher.Dispatcher.ForInstanceCheckA dispatcher that performs an instance check.static classJavaDispatcher.Dispatcher.ForNonStaticMethodA dispatcher for invoking a non-static proxied method.static classJavaDispatcher.Dispatcher.ForStaticMethodA dispatcher for invoking a static proxied method.static classJavaDispatcher.Dispatcher.ForUnresolvedMethodA dispatcher for an unresolved method.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intapply(org.objectweb.asm.MethodVisitor methodVisitor, java.lang.reflect.Method method)Implements this dispatcher in a generated proxy.java.lang.Objectinvoke(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.
-
-