private boolean hasProperConstructor(Class<? extends EntityTuplizer> tuplizerClass, Class[] constructorArgs) { return getProperConstructor( tuplizerClass, constructorArgs ) != null && ! ReflectHelper.isAbstractClass( tuplizerClass ); }
/** * Construct an instance of the given tuplizer class. * * @param tuplizerClass The tuplizer class to instantiate * @param metamodel The metadata for the entity. * @param persistentClass The mapping info for the entity. * * @return The instantiated tuplizer * * @throws HibernateException if the {@link Constructor#newInstance} call fails. */ public EntityTuplizer constructTuplizer( Class<? extends EntityTuplizer> tuplizerClass, EntityMetamodel metamodel, PersistentClass persistentClass) { Constructor<? extends EntityTuplizer> constructor = getProperConstructor( tuplizerClass, ENTITY_TUP_CTOR_SIG ); assert constructor != null : "Unable to locate proper constructor for tuplizer [" + tuplizerClass.getName() + "]"; try { return constructor.newInstance( metamodel, persistentClass ); } catch ( Throwable t ) { throw new HibernateException( "Unable to instantiate default tuplizer [" + tuplizerClass.getName() + "]", t ); } }
private boolean hasProperConstructor(Class<? extends EntityTuplizer> tuplizerClass, Class[] constructorArgs) { return getProperConstructor( tuplizerClass, constructorArgs ) != null && ! ReflectHelper.isAbstractClass( tuplizerClass ); }
private boolean hasProperConstructor(Class<? extends EntityTuplizer> tuplizerClass, Class[] constructorArgs) { return getProperConstructor( tuplizerClass, constructorArgs ) != null && ! ReflectHelper.isAbstractClass( tuplizerClass ); }
/** * Construct an instance of the given tuplizer class. * * @param tuplizerClass The tuplizer class to instantiate * @param metamodel The metadata for the entity. * @param persistentClass The mapping info for the entity. * * @return The instantiated tuplizer * * @throws HibernateException if the {@link Constructor#newInstance} call fails. */ public EntityTuplizer constructTuplizer( Class<? extends EntityTuplizer> tuplizerClass, EntityMetamodel metamodel, PersistentClass persistentClass) { Constructor<? extends EntityTuplizer> constructor = getProperConstructor( tuplizerClass, ENTITY_TUP_CTOR_SIG ); assert constructor != null : "Unable to locate proper constructor for tuplizer [" + tuplizerClass.getName() + "]"; try { return constructor.newInstance( metamodel, persistentClass ); } catch ( Throwable t ) { throw new HibernateException( "Unable to instantiate default tuplizer [" + tuplizerClass.getName() + "]", t ); } }
/** * Construct an instance of the given tuplizer class. * * @param tuplizerClass The tuplizer class to instantiate * @param metamodel The metadata for the entity. * @param entityBinding The mapping info for the entity. * * @return The instantiated tuplizer * * @throws HibernateException if the {@link Constructor#newInstance} call fails. */ public EntityTuplizer constructTuplizer( Class<? extends EntityTuplizer> tuplizerClass, EntityMetamodel metamodel, EntityBinding entityBinding) { Constructor<? extends EntityTuplizer> constructor = getProperConstructor( tuplizerClass, ENTITY_TUP_CTOR_SIG_NEW ); assert constructor != null : "Unable to locate proper constructor for tuplizer [" + tuplizerClass.getName() + "]"; try { return constructor.newInstance( metamodel, entityBinding ); } catch ( Throwable t ) { throw new HibernateException( "Unable to instantiate default tuplizer [" + tuplizerClass.getName() + "]", t ); } }
/** * Construct an instance of the given tuplizer class. * * @param tuplizerClass The tuplizer class to instantiate * @param metamodel The metadata for the entity. * @param entityBinding The mapping info for the entity. * * @return The instantiated tuplizer * * @throws HibernateException if the {@link Constructor#newInstance} call fails. */ public EntityTuplizer constructTuplizer( Class<? extends EntityTuplizer> tuplizerClass, EntityMetamodel metamodel, EntityBinding entityBinding) { Constructor<? extends EntityTuplizer> constructor = getProperConstructor( tuplizerClass, ENTITY_TUP_CTOR_SIG_NEW ); assert constructor != null : "Unable to locate proper constructor for tuplizer [" + tuplizerClass.getName() + "]"; try { return constructor.newInstance( metamodel, entityBinding ); } catch ( Throwable t ) { throw new HibernateException( "Unable to instantiate default tuplizer [" + tuplizerClass.getName() + "]", t ); } }
/** * Construct an instance of the given tuplizer class. * * @param tuplizerClass The tuplizer class to instantiate * @param metamodel The metadata for the entity. * @param persistentClass The mapping info for the entity. * * @return The instantiated tuplizer * * @throws HibernateException if the {@link Constructor#newInstance} call fails. */ public EntityTuplizer constructTuplizer( Class<? extends EntityTuplizer> tuplizerClass, EntityMetamodel metamodel, PersistentClass persistentClass) { Constructor<? extends EntityTuplizer> constructor = getProperConstructor( tuplizerClass, ENTITY_TUP_CTOR_SIG ); assert constructor != null : "Unable to locate proper constructor for tuplizer [" + tuplizerClass.getName() + "]"; try { return constructor.newInstance( metamodel, persistentClass ); } catch ( Throwable t ) { throw new HibernateException( "Unable to instantiate default tuplizer [" + tuplizerClass.getName() + "]", t ); } }