public class AOPProxy<T> extends DelegationHandler<T>
delegate, interfaces, properties| Constructor and Description |
|---|
AOPProxy(T delegate,
ICRunnable<?> before,
ICRunnable<?> after,
boolean proxyResult)
constructor
|
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
createEnhancement(T instance,
ICRunnable<?> before,
ICRunnable<?> after,
boolean proxyResult)
createEnhancement
|
Object |
invoke(Object proxy,
Method method,
Object[] args) |
canDelegate, clone, createProxy, getDelegate, getInterfaces, getMethodArgsId, getProperties, initDeserialization, invokeDelegate, setInterfaces, setProperty, toStringpublic AOPProxy(T delegate, ICRunnable<?> before, ICRunnable<?> after, boolean proxyResult)
delegate - original instancebefore - (optional) action to execute. will be run with arguments instance, method, and args - before executing the original method.after - (optional) action to execute. will be run with arguments instance, method, and args - after executing the original method.proxyResult - whether to wrap the result into a new proxy (recursive).public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
invoke in interface InvocationHandlerinvoke in class DelegationHandler<T>Throwablepublic static final <T> T createEnhancement(T instance,
ICRunnable<?> before,
ICRunnable<?> after,
boolean proxyResult)
T - instance - delegatebefore - (optional) action to execute. will be run with arguments instance, method, and args - before executing the original method.after - (optional) action to execute. will be run with arguments instance, method, and args - after executing the original method.proxyResult - whether to wrap the result into a new proxy (recursive).Copyright © 2012–2018. All rights reserved.