Package org.proxy4j.core.javassist
Class JavassistProxyInvocation<T>
- java.lang.Object
-
- org.proxy4j.core.javassist.JavassistProxyInvocation<T>
-
- All Implemented Interfaces:
ProxyInvocation<T>
public class JavassistProxyInvocation<T> extends Object implements ProxyInvocation<T>
A Javassist implementation of
ProxyInvocation.- Author:
- Brennan Spies
-
-
Constructor Summary
Constructors Constructor Description JavassistProxyInvocation(T proxy, Method method, Object[] args)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object[]getArguments()The arguments passed to the target proxy invocation.MethodgetMethod()Return the method on which the proxy invocation was made.TgetProxy()Returns the proxy on which the method was invoked.Objectinvoke(T target)Executes this invocation on a target object of the same type.
-
-
-
Method Detail
-
invoke
public Object invoke(T target) throws Throwable
Executes this invocation on a target object of the same type.- Specified by:
invokein interfaceProxyInvocation<T>- Parameters:
target- The target- Returns:
- The return value of the invocation
- Throws:
Throwable- If an error is thrown by the invocation
-
getMethod
public Method getMethod()
Return the method on which the proxy invocation was made.- Specified by:
getMethodin interfaceProxyInvocation<T>- Returns:
- The method
-
getProxy
public T getProxy()
Returns the proxy on which the method was invoked.- Specified by:
getProxyin interfaceProxyInvocation<T>- Returns:
- The proxy
-
getArguments
public Object[] getArguments()
The arguments passed to the target proxy invocation.- Specified by:
getArgumentsin interfaceProxyInvocation<T>- Returns:
- The arguments
-
-