public class MethodReplaceStrategyImpl extends java.lang.Object implements MethodReplaceStrategy
Modifier and Type | Class and Description |
---|---|
private class |
MethodReplaceStrategyImpl.MethodInvocationHandler |
Modifier and Type | Field and Description |
---|---|
private java.lang.reflect.Method |
method |
Constructor and Description |
---|
MethodReplaceStrategyImpl(java.lang.reflect.Method method) |
Modifier and Type | Method and Description |
---|---|
void |
with(java.lang.reflect.InvocationHandler invocationHandler)
Replaces the method invocation with an invocation handler
|
void |
with(java.lang.reflect.Method method)
Replaces the method invocation with this method.
|
public MethodReplaceStrategyImpl(java.lang.reflect.Method method)
public void with(java.lang.reflect.Method method)
MethodReplaceStrategy
Note that both methods needs to be static.
with
in interface MethodReplaceStrategy
method
- The method call will be replaced by this method instead. Needs
to be static.public void with(java.lang.reflect.InvocationHandler invocationHandler)
MethodReplaceStrategy
with
in interface MethodReplaceStrategy
invocationHandler
- The invocation handler to replace the method call with.