public class Trace extends Object implements MethodInterceptor
| Modifier and Type | Method and Description |
|---|---|
Object |
intercept(Object obj,
Method method,
Object[] args,
MethodProxy proxy)
All generated proxied methods call this method instead of the original method.
|
static void |
main(String[] args) |
static Object |
newInstance(Class clazz) |
public static void main(String[] args)
args - the command line argumentspublic Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable
MethodInterceptorintercept in interface MethodInterceptorobj - "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 neededThrowable - any exception may be thrown; if so, super method will not be invokedMethodProxyCopyright © 2025. All rights reserved.