org.logicalcobwebs.cglib.proxy
Interface MethodInterceptor
- All Superinterfaces:
- Callback
- All Known Implementing Classes:
- MyProxy, ProxyDatabaseMetaData, ProxyStatement, WrappedConnection
public interface MethodInterceptor
- extends Callback
General-purpose Enhancer
callback which provides for "around advice".
- Version:
- $Id: MethodInterceptor.java,v 1.1 2003/12/12 19:28:11 billhorsman Exp $
- Author:
- Juozas Baliuka baliuka@mwm.lt
Method Summary |
java.lang.Object |
intercept(java.lang.Object obj,
java.lang.reflect.Method method,
java.lang.Object[] args,
MethodProxy proxy)
All generated proxied methods call this method instead of the original method. |
intercept
java.lang.Object intercept(java.lang.Object obj,
java.lang.reflect.Method method,
java.lang.Object[] args,
MethodProxy proxy)
throws java.lang.Throwable
- All generated proxied methods call this method instead of the original method.
The original method may either be invoked by normal reflection using the Method object,
or by using the MethodProxy (faster).
- Parameters:
obj
- "this", the enhanced objectmethod
- intercepted Methodargs
- argument array; primitive types are wrappedproxy
- used to invoke super (non-intercepted method); may be called
as many times as needed
- Returns:
- any value compatible with the signature of the proxied method. Method returning void will ignore this value.
- Throws:
java.lang.Throwable
- any exception may be thrown; if so, super method will not be invoked- See Also:
MethodProxy