Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 327609

Summary: Refactor provisional API o.e.jpt.core.utility.jdt.Member hierarchy to include AnnotatedElement
Product: [WebTools] Dali JPA Tools Reporter: Karen Butzke <karenfbutzke>
Component: GeneralAssignee: Karen Butzke <karenfbutzke>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: P3    
Version: 3.0   
Target Milestone: 3.0 M3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
proposed patch against head none

Description Karen Butzke CLA 2010-10-12 15:59:04 EDT
In preparation for supporting package annotations in bug 265087 I am going to refactor the o.e.jpt.core.utility.jdt.Member hierarchy to add an AnnotatedElement interface.

Provisional API changes:
1. Member will extend AnnotatedElement
2. All methods from Member will move to AnnotatedElement except isPersistable(CompilationUnit) and matches(String, int)
3. o.e.jpt.core.resource.java.JavaResourcePersistentMember will now extend the new JavaResourceAnnotatedElement.
4. These methods stay on JavaResourcePersistentMember, all others move up to JavaResourceAnnotatedElement:
     setPrimaryAnnotation(String, Iterable<String>);
     boolean isPersistable();
     boolean isFinal();
     boolean isFor(String memberName, int occurrence);
     void resolveTypes(CompilationUnit astRoot);

5. o.e.jpt.core.resource.java.AnnotationDefinition method signatures become:
     Annotation buildAnnotation(JavaResourceAnnotatedElement,AnnotatedElement);
     Annotation buildAnnotation(JavaResourceAnnotatedElement, IAnnotation);
     Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent);

6. JavaGeneratorContainer initialize and update methods take a JavaResourceAnnotatedElement. Making this change since some JPA extensions have generators that are allowed on packages, don't want to limit to Members.

7. JavaQueryContainer initialize and update methods take a JavaResourceAnnotatedElement.
Comment 1 Karen Butzke CLA 2010-10-12 16:01:42 EDT
Created attachment 180709 [details]
proposed patch against head
Comment 2 Karen Butzke CLA 2010-10-13 10:04:00 EDT
fixed in 3.0M3
Comment 3 Karen Butzke CLA 2011-01-20 09:11:19 EST
This refactoring has been verified