Bug 83297 - [1.5] Annotation bindings don't provide their declared elements/methods
Summary: [1.5] Annotation bindings don't provide their declared elements/methods
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M5   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-20 08:26 EST by Markus Keller CLA
Modified: 2005-02-16 12:10 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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