[cdi-dev] @WithAnnotations and meta-annotations

Martin Kouba mkouba at redhat.com
Wed Jan 13 05:16:28 EST 2016


Hi all,

suppose the following use-case:

* a class Foo annotated with a stereotype @Alpha which declares another 
stereotype @Bravo with meta-annotation @Baz
* a PAT observer annotated with @WithAnnotations({ Baz.class })

The question is: should this observer method be called for Foo? In other 
words, how should we interpret "11.5.6. ProcessAnnotatedType event"? The 
current spec wording seems ambiguous.

Weld currently does not perform the check "recursively", i.e. the 
observer method will not be called as Weld only considers annotations on 
the annotated type, on any member/parameter of the annotated type, or 
meta-annotations of such annotations (i.e. goes one level down).

I'm not sure about OWB.

Also note that there is no TCK test for this special use-case.

Thanks,

Martin


More information about the cdi-dev mailing list