net.sf.cglib.proxy.InvocationHandler Java Examples

The following examples show how to use net.sf.cglib.proxy.InvocationHandler. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CGLIBLazyInitializer.java    From cacheonix-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
public static Class getProxyFactory(Class persistentClass, Class[] interfaces)
		throws HibernateException {
	Enhancer e = new Enhancer();
	e.setSuperclass( interfaces.length == 1 ? persistentClass : null );
	e.setInterfaces(interfaces);
	e.setCallbackTypes(new Class[]{
		InvocationHandler.class,
		NoOp.class,
  		});
 		e.setCallbackFilter(FINALIZE_FILTER);
 		e.setUseFactory(false);
	e.setInterceptDuringConstruction( false );
	return e.createClass();
}