Java Code Examples for org.hibernate.internal.util.ReflectHelper#isAbstractClass()

The following examples show how to use org.hibernate.internal.util.ReflectHelper#isAbstractClass() . 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: PojoInstantiator.java    From lams with GNU General Public License v2.0 6 votes vote down vote up
public PojoInstantiator(
		Class mappedClass,
		ReflectionOptimizer.InstantiationOptimizer optimizer,
		boolean embeddedIdentifier) {
	this.mappedClass = mappedClass;
	this.optimizer = optimizer;
	this.embeddedIdentifier = embeddedIdentifier;
	this.isAbstract = ReflectHelper.isAbstractClass( mappedClass );

	try {
		constructor = ReflectHelper.getDefaultConstructor(mappedClass);
	}
	catch ( PropertyNotFoundException pnfe ) {
		LOG.noDefaultConstructor( mappedClass.getName() );
		constructor = null;
	}
}
 
Example 2
Source File: PojoInstantiator.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
public PojoInstantiator(Class componentClass, ReflectionOptimizer.InstantiationOptimizer optimizer) {
	this.mappedClass = componentClass;
	this.isAbstract = ReflectHelper.isAbstractClass( mappedClass );
	this.optimizer = optimizer;

	this.embeddedIdentifier = false;

	try {
		constructor = ReflectHelper.getDefaultConstructor(mappedClass);
	}
	catch ( PropertyNotFoundException pnfe ) {
		LOG.noDefaultConstructor(mappedClass.getName());
		constructor = null;
	}
}
 
Example 3
Source File: PojoComponentTuplizer.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
protected Instantiator buildInstantiator(Component component) {
	if ( component.isEmbedded() && ReflectHelper.isAbstractClass( this.componentClass ) ) {
		return new ProxiedInstantiator( this.componentClass );
	}
	if ( optimizer == null ) {
		return new PojoInstantiator( this.componentClass, null );
	}
	else {
		return new PojoInstantiator( this.componentClass, optimizer.getInstantiationOptimizer() );
	}
}
 
Example 4
Source File: EntityTuplizerFactory.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
private boolean hasProperConstructor(Class<? extends EntityTuplizer> tuplizerClass, Class[] constructorArgs) {
	return getProperConstructor( tuplizerClass, constructorArgs ) != null
			&& ! ReflectHelper.isAbstractClass( tuplizerClass );
}