接口 CallbackFilter
- 所有已知实现类:
AbstractCallbackFilter
- 函数接口:
- 这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。
Map methods of subclasses generated by
Enhancer to a particular
callback. The type of the callbacks chosen for each method affects the
bytecode generated for that method in the subclass, and cannot change for the
life of the class.
Note: CallbackFilter implementations are supposed to be lightweight
as cglib might keep CallbackFilter objects alive to enable caching of
generated classes. Prefer using static classes for implementation of
CallbackFilter.
-
方法概要
修饰符和类型方法说明intMap a method to a callback.booleanTheCallbackFilterin use affects which cached class theEnhancerwill use, so this is a reminder that you should correctly implementequalsandhashCodefor customCallbackFilterimplementations in order to improve performance.
-
方法详细资料
-
accept
Map a method to a callback.- 参数:
method- the intercepted method- 返回:
- the index into the array of callbacks (as specified by
Enhancer.setCallbacks(cn.taketoday.bytecode.proxy.Callback...)) to use for the method,
-
equals
TheCallbackFilterin use affects which cached class theEnhancerwill use, so this is a reminder that you should correctly implementequalsandhashCodefor customCallbackFilterimplementations in order to improve performance.
-