> Hi all,
>
[quoted text clipped - 8 lines]
> ...
> }
AFAIK, there is no technical reason why that cannot be true.
> I wish that on the reflection side I had something like
> getAnnotationsByType ( Class clazz ).
You have getAnnotation(Class<T> annotationType) [see below]
> Any chance things will be improved in future?
There's a chance; I don't think it's high on anyone's list of things to
do, though.
> Does anyone know a workaround?
When I ran into this problem, I created a new supra-annotation:
public @interface Option {
[...]
}
public @interface Options {
Option[] annotations();
}
And used at as such:
@Options({
@Option( [...] ),
@Option( [...] )
})
public class Foobar {
[ ... ]
}

Signature
Beware of bugs in the above code; I have only proved it correct, not
tried it. -- Donald E. Knuth