FileDocCategorySizeDatePackage
InstantiationOptimizerAdapter.javaAPI DocHibernate 3.2.51304Fri Feb 03 15:15:20 GMT 2006org.hibernate.bytecode.cglib

InstantiationOptimizerAdapter

public class InstantiationOptimizerAdapter extends Object implements ReflectionOptimizer.InstantiationOptimizer, Serializable
The {@link ReflectionOptimizer.InstantiationOptimizer} implementation for CGLIB which simply acts as an adpater to the {@link FastClass} class.
author
Steve Ebersole

Fields Summary
private net.sf.cglib.reflect.FastClass
fastClass
Constructors Summary
public InstantiationOptimizerAdapter(net.sf.cglib.reflect.FastClass fastClass)

		this.fastClass = fastClass;
	
Methods Summary
public java.lang.ObjectnewInstance()

		try {
			return fastClass.newInstance();
		}
		catch ( Throwable t ) {
			throw new InstantiationException(
					"Could not instantiate entity with CGLIB optimizer: ",
			        fastClass.getJavaClass(),
			        t
			);
		}
	
private voidreadObject(java.io.ObjectInputStream in)

		Class beanClass = ( Class ) in.readObject();
		fastClass = FastClass.create( beanClass );
	
private voidwriteObject(java.io.ObjectOutputStream out)

		out.writeObject( fastClass.getJavaClass() );