接口 CallbackFilter
-
- 所有已知实现类:
CallbackHelper
public interface CallbackFilterMap methods of subclasses generated byEnhancerto 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:
CallbackFilterimplementations are supposed to be lightweight as cglib might keepCallbackFilterobjects alive to enable caching of generated classes. Prefer usingstaticclasses for implementation ofCallbackFilter.
-
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 intaccept(java.lang.reflect.Method method)Map a method to a callback.booleanequals(java.lang.Object o)TheCallbackFilterin use affects which cached class theEnhancerwill use, so this is a reminder that you should correctly implementequalsandhashCodefor customCallbackFilterimplementations in order to improve performance.
-
-
-
方法详细资料
-
accept
int accept(java.lang.reflect.Method method)
Map a method to a callback.- 参数:
method- the intercepted method- 返回:
- the index into the array of callbacks (as specified by
Enhancer.setCallbacks(net.sf.cglib.proxy.Callback[])) to use for the method,
-
equals
boolean equals(java.lang.Object o)
TheCallbackFilterin use affects which cached class theEnhancerwill use, so this is a reminder that you should correctly implementequalsandhashCodefor customCallbackFilterimplementations in order to improve performance.- 覆盖:
equals在类中java.lang.Object
-
-