Modifier and Type | Field and Description |
---|---|
private java.lang.Class<T> |
declaringType |
private Invokable |
next |
private T |
target |
Constructor and Description |
---|
InvocationDiverter(java.lang.Class<T> declaringType,
T target,
Invokable next) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
invoke(Invocation invocation)
Performs an action in response to an invocation.
|
java.lang.String |
toString() |
private final java.lang.Class<T> declaringType
private final T target
private final Invokable next
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object invoke(Invocation invocation) throws java.lang.Throwable
Invokable
invoke
in interface Invokable
invocation
- The invocation to perform.null
if the invoked method has a void return type.java.lang.Throwable
- An exception to be thrown to the caller, if not returning a value. Any checked exception
thrown must be in the throws
list of the invoked method.