File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
tooling/metamodel-generator/src/main/java/org/hibernate/processor Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -367,7 +367,7 @@ private void processClasses(RoundEnvironment roundEnvironment) {
367367 try {
368368 if ( !included ( element )
369369 || hasAnnotation ( element , Constants .EXCLUDE )
370- || hasAnnotation ( context . getElementUtils (). getPackageOf ( element ) , Constants .EXCLUDE ) ) {
370+ || hasPackageAnnotation ( element , Constants .EXCLUDE ) ) {
371371 // skip it completely
372372 }
373373 else if ( isEntityOrEmbeddable ( element ) ) {
@@ -420,6 +420,11 @@ else if ( element instanceof TypeElement ) {
420420 }
421421 }
422422
423+ private boolean hasPackageAnnotation (Element element , String annotation ) {
424+ final PackageElement pack = context .getElementUtils ().getPackageOf ( element ); // null for module descriptor
425+ return pack != null && hasAnnotation ( pack , annotation );
426+ }
427+
423428 private void createMetaModelClasses () {
424429
425430 for ( Metamodel aux : context .getMetaAuxiliaries () ) {
You can’t perform that action at this time.
0 commit comments