接口的使用
cn.taketoday.bytecode.proxy.Callback
使用Callback的程序包
-
cn.taketoday.bytecode.proxy中Callback的使用
修饰符和类型接口说明interfaceDispatchingEnhancercallback.interfaceEnhancercallback that simply returns the value to return from the proxied method.interfaceInvocationHandlerreplacement (unavailable under JDK 1.2).interfaceLazy-loadingEnhancercallback.interfaceGeneral-purposeEnhancercallback which provides for "around advice".interfaceMethods using thisEnhancercallback will delegate directly to the default (super) implementation in the base class.interfaceDispatchingEnhancercallback.修饰符和类型方法说明Factory.getCallback(int index) Return theCallbackimplementation at the specified index.Callback[]AbstractCallbackFilter.getCallbacks()Callback[]Factory.getCallbacks()Get the current set of callbacks for ths object.参数类型为Callback的cn.taketoday.bytecode.proxy中的方法修饰符和类型方法说明static ObjectHelper method to create an intercepted object.static ObjectHelper method to create an intercepted object.static ObjectEnhancer.create(Class superclass, Class[] interfaces, CallbackFilter filter, Callback[] callbacks) Helper method to create an intercepted object.private static TypeCallbackInfo.determineType(Callback callback, boolean checkAll) static Type[]CallbackInfo.determineTypes(Callback[] callbacks) static Type[]CallbackInfo.determineTypes(Callback[] callbacks, boolean checkAll) Enhancer.EnhancerFactoryData.newInstance(Class<?>[] argumentTypes, Object[] arguments, Callback[] callbacks) Creates proxy instance for given argument types, and assigns the callbacks.Factory.newInstance(Callback callback) Creates new instance of the same type, using the no-arg constructor.Factory.newInstance(Callback[] callbacks) Creates new instance of the same type, using the no-arg constructor.Factory.newInstance(Class<?>[] types, Object[] args, Callback[] callbacks) Creates a new instance of the same type, using the constructor matching the given signature.static voidEnhancer.registerCallbacks(Class generatedClass, Callback[] callbacks) Call this method to register theCallbackarray to use before creating a new instance of the generated class via reflection.static voidEnhancer.registerStaticCallbacks(Class generatedClass, Callback[] callbacks) Similar toEnhancer.registerCallbacks(java.lang.Class, cn.taketoday.bytecode.proxy.Callback[]), but suitable for use when multiple threads will be creating instances of the generated class.voidEnhancer.setCallback(Callback callback) Set the singleCallbackto use.voidFactory.setCallback(int index, Callback callback) Set the callback for this object for the given type.voidEnhancer.setCallbacks(Callback... callbacks) Set the array of callbacks to use.voidFactory.setCallbacks(Callback[] callbacks) Replace all of the callbacks for this object at once.private static voidEnhancer.setCallbacksHelper(Class type, Callback[] callbacks, String methodName) private voidEnhancer.EnhancerFactoryData.setThreadCallbacks(Callback[] callbacks) private static voidEnhancer.setThreadCallbacks(Class type, Callback[] callbacks)