From: <one...@us...> - 2002-11-09 01:49:26
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/type In directory usw-pr-cvs1:/tmp/cvs-serv8934/hibernate/type Modified Files: ComponentType.java Log Message: cache the constructor Index: ComponentType.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/type/ComponentType.java,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** ComponentType.java 9 Nov 2002 01:38:06 -0000 1.45 --- ComponentType.java 9 Nov 2002 01:49:23 -0000 1.46 *************** *** 22,25 **** --- 22,26 ---- private final Class componentClass; + private final Constructor constructor; private final Type[] types; private final Method[] getters; *************** *** 78,81 **** --- 79,83 ---- this.cascade = cascade; this.joinedFetch = joinedFetch; + constructor = ReflectHelper.getDefaultConstructor(componentClass); } *************** *** 217,221 **** public Object instantiate(Object parent) throws HibernateException { try { - Constructor constructor = ReflectHelper.getDefaultConstructor(componentClass); Object inst = constructor.newInstance(null); if (parentSetter!=null) ReflectHelper.set(parentSetter, inst, parent, componentClass, parentProperty); --- 219,222 ---- |