This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
JPA Verification often needs to access the annotation that "created" given model element, for example @Entity annotation in case of entity element. Such information could be easily remembered during creation of the model and would save some processing time for the verification module. In case the element was defined only in orm.xml (not using annotation) the method should return null. Such functionality could be useful also for implementing other functionality such as refactorings.
Would it be enough if you could obtain an ElementHandle<TypeElement> for the TypeElement defining the entity class? It's not possible to return ElementHandle's for non-elements (such as AnnotationMirror's), and I'm not comfortable with returning "live" javac elements -- I'd prefer to return only ElementHandle's.