Skip to content

Commit 41f262b

Browse files
committed
Make sure inheritance test works with interfaces
1 parent 623cbf8 commit 41f262b

File tree

1 file changed

+8
-0
lines changed
  • tooling/metamodel-generator/src/main/java/org/hibernate/processor/util

1 file changed

+8
-0
lines changed

tooling/metamodel-generator/src/main/java/org/hibernate/processor/util/TypeUtils.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -657,6 +657,14 @@ public static boolean implementsInterface(TypeElement type, String interfaceName
657657
}
658658
}
659659
}
660+
TypeMirror superclass = type.getSuperclass();
661+
if ( superclass != null && superclass.getKind() == TypeKind.DECLARED ) {
662+
final DeclaredType declaredType = (DeclaredType) superclass;
663+
final TypeElement typeElement = (TypeElement) declaredType.asElement();
664+
if( implementsInterface( typeElement, interfaceName) ) {
665+
return true;
666+
}
667+
}
660668
return false;
661669
}
662670

0 commit comments

Comments
 (0)