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.

Bug 102164 - Provide a method to obtain ElementHandle for the "creating" annotation
Summary: Provide a method to obtain ElementHandle for the "creating" annotation
Status: NEW
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Andrei Badea
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-23 15:04 UTC by Tomasz Slota
Modified: 2007-04-24 09:39 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomasz Slota 2007-04-23 15:04:05 UTC
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.
Comment 1 Andrei Badea 2007-04-24 09:39:35 UTC
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.