Bug 83297

Summary: [1.5] Annotation bindings don't provide their declared elements/methods
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Markus Keller CLA 2005-01-20 08:26:12 EST
I20050118-1015

@Annot(value="Hello", count=-1)
@interface Annot {
    String value();
    int count();
}

The ITypeBinding for @Annot does not provide the declared elements/methods.
#getDeclaredMethods() returns an empty array, instead of method bindings for
value() and count().
Comment 1 Olivier Thomann CLA 2005-01-20 10:13:37 EST
I will investigate.
Comment 2 Olivier Thomann CLA 2005-01-20 11:04:37 EST
Right now the problem is that the specification of the getDeclaredMethods()
doesn't cover annotation type declaration. The implementation is in line witht
the specs. I ask Jim to add the annotation type declarations as a valid type
that can return declared methods.
Should be fixed today.
Comment 3 Jim des Rivieres CLA 2005-01-20 11:09:07 EST
Updated spec for ITypeBinding.getDeclaredMethods() to say that it will return 
IMethodBindings for its annotation type members.
Comment 4 Olivier Thomann CLA 2005-01-20 12:18:03 EST
Fixed and released in HEAD.
Regression test added.
Comment 5 David Audel CLA 2005-02-16 12:10:25 EST
Verified in I20050215-2300