HHH-3517 : default Tuplizer impls

git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@15341 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
Steve Ebersole 2008-10-13 15:08:15 +00:00
parent 02ab577b05
commit 1c27ee9bb5
2 changed files with 3 additions and 9 deletions

View File

@ -140,7 +140,8 @@ public class EntityTuplizerFactory implements Serializable {
} }
private boolean hasProperConstructor(Class tuplizerClass) { private boolean hasProperConstructor(Class tuplizerClass) {
return getProperConstructor( tuplizerClass ) != null; return getProperConstructor( tuplizerClass ) != null
&& ! ReflectHelper.isAbstractClass( tuplizerClass );
} }
private Constructor getProperConstructor(Class clazz) { private Constructor getProperConstructor(Class clazz) {

View File

@ -144,14 +144,7 @@ public final class ReflectHelper {
*/ */
public static boolean implementsInterface(Class clazz, Class intf) { public static boolean implementsInterface(Class clazz, Class intf) {
assert intf.isInterface() : "Interface to check was not an interface"; assert intf.isInterface() : "Interface to check was not an interface";
return intf.isAssignableFrom( clazz );
Class[] interfaces = clazz.getInterfaces();
for ( int i = 0; i < interfaces.length; i++ ) {
if ( intf.isAssignableFrom( interfaces[i] ) ) {
return true;
}
}
return false;
} }
/** /**