If you have a program with multiple local classes, like the one attached,
calling AnnotationDatabase.getAnnosForType() will return the same
annotation information for every local class.
The reason is the AnnotationDatabase uses ITypeBinding.getQualifiedName()
as the key for types. However, getQualifiedName() returns the empty string
for all anonymous and local classes. This is also a problem for annotated
fields and methods of these classes, since the resolveVariableBinding
method of AnnotationDatabase uses the getQualifiedName() method on the
declaring type.
I will probably switch the key to, ITypeBinding.getKey().
Original issue reported on code.google.com by nels.bec...@gmail.com on 16 Sep 2008 at 8:24
Original issue reported on code.google.com by
nels.bec...@gmail.com
on 16 Sep 2008 at 8:24