Package net.bytebuddy.utility.dispatcher
Class JavaDispatcher.ProxiedInvocationHandler
java.lang.Object
net.bytebuddy.utility.dispatcher.JavaDispatcher.ProxiedInvocationHandler
- All Implemented Interfaces:
InvocationHandler
- Enclosing class:
JavaDispatcher<T>
@Enhance
protected static class JavaDispatcher.ProxiedInvocationHandler
extends Object
implements InvocationHandler
An invocation handler that invokes given dispatchers.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
The proxied type's name.private static final Object[]
Indicates that an invocation handler does not provide any arguments.private final Map
<Method, JavaDispatcher.Dispatcher> A mapping of proxy type methods to their proxied dispatchers. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ProxiedInvocationHandler
(String name, Map<Method, JavaDispatcher.Dispatcher> targets) Creates a new invocation handler for proxying a type. -
Method Summary
-
Field Details
-
NO_ARGUMENTS
Indicates that an invocation handler does not provide any arguments. -
name
The proxied type's name. -
targets
A mapping of proxy type methods to their proxied dispatchers.
-
-
Constructor Details
-
ProxiedInvocationHandler
Creates a new invocation handler for proxying a type.- Parameters:
name
- The proxied type's name.targets
- A mapping of proxy type methods to their proxied dispatchers.
-
-
Method Details
-
invoke
@MaybeNull public Object invoke(Object proxy, Method method, @MaybeNull Object[] argument) throws Throwable - Specified by:
invoke
in interfaceInvocationHandler
- Throws:
Throwable
-