[cdi-dev] Accepting class type for simple (qualifier) annotations in APIs?

arjan tijms arjan.tijms at gmail.com
Mon Sep 12 06:28:23 EDT 2016


Wouldn't it be convenient as the CDI API that now requires an Annotation
instance in various APIs, would also accept the class type of that

E.g. in BeanManager there's this method:

Set<Bean<?>> getBeans(Type beanType, Annotation... qualifiers)

This not rarely requires one to create an AnnotationLiteral, which is not
specifically difficult but a tad verbose. For qualifiers that have no
(binding) attributes, a simple Class would be much easier to use.


Kind regards,
Arjan Tijms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/cdi-dev/attachments/20160912/4f276785/attachment.html 

More information about the cdi-dev mailing list