Package net.bytebuddy.utility.dispatcher
Class JavaDispatcher.ProxiedInvocationHandler
- java.lang.Object
-
- net.bytebuddy.utility.dispatcher.JavaDispatcher.ProxiedInvocationHandler
-
- All Implemented Interfaces:
java.lang.reflect.InvocationHandler
- Enclosing class:
- JavaDispatcher<T>
@Enhance protected static class JavaDispatcher.ProxiedInvocationHandler extends java.lang.Object implements java.lang.reflect.InvocationHandler
An invocation handler that invokes given dispatchers.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
name
The proxied type's name.private static java.lang.Object[]
NO_ARGUMENTS
Indicates that an invocation handler does not provide any arguments.private java.util.Map<java.lang.reflect.Method,JavaDispatcher.Dispatcher>
targets
A mapping of proxy type methods to their proxied dispatchers.
-
Constructor Summary
Constructors Modifier Constructor Description protected
ProxiedInvocationHandler(java.lang.String name, java.util.Map<java.lang.reflect.Method,JavaDispatcher.Dispatcher> targets)
Creates a new invocation handler for proxying a type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] argument)
-
-
-
Field Detail
-
NO_ARGUMENTS
private static final java.lang.Object[] NO_ARGUMENTS
Indicates that an invocation handler does not provide any arguments.
-
name
private final java.lang.String name
The proxied type's name.
-
targets
private final java.util.Map<java.lang.reflect.Method,JavaDispatcher.Dispatcher> targets
A mapping of proxy type methods to their proxied dispatchers.
-
-
Constructor Detail
-
ProxiedInvocationHandler
protected ProxiedInvocationHandler(java.lang.String name, java.util.Map<java.lang.reflect.Method,JavaDispatcher.Dispatcher> targets)
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 Detail
-
invoke
@MaybeNull public java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, @MaybeNull java.lang.Object[] argument) throws java.lang.Throwable
- Specified by:
invoke
in interfacejava.lang.reflect.InvocationHandler
- Throws:
java.lang.Throwable
-
-