In the CGLIBLazyInitializer class callbacks are created for the proxy class. Two callback types are registered - InvocationHandler.class, NoOp.class. And the callback filter is setup in the following way -
Code:
private static final CallbackFilter FINALIZE_FILTER = new CallbackFilter() {
public int accept(Method method) {
if ( method.getParameterTypes().length == 0 && method.getName().equals("finalize") ){
return 1;
}
else {
return 0;
}
}
};
This is not clear to me. Why the NoOp type callback is needed and its selection from the callback filter? If anyone knows please give some hint (or explanation).
Thanks.
Shahid