-
1. Re: AnnotatedTypeConfigurator: easy recipe for configuring superclass fields?
ljnelson Mar 20, 2017 1:59 PM (in response to ljnelson)Never mind! I see that the
AnnotatedTypeConfigurator#filterFields()
method does in fact return all fields from the entire type hierarchy. A little unexpected, but I'll take it! -
2. Re: AnnotatedTypeConfigurator: easy recipe for configuring superclass fields?
manovotn Mar 21, 2017 4:33 AM (in response to ljnelson)Hmm, that sounds somewhat suprising.
However,
AnnotatedTypeConfigurator#filterFields() makes use of
AnnotatedType#getFields()
which is supposed to return all annotated fields of given type.So that might be why you get all of them.
Gotta try this with some dummy project to see for myself.
-
3. Re: AnnotatedTypeConfigurator: easy recipe for configuring superclass fields?
manovotn Mar 21, 2017 4:47 AM (in response to manovotn)Alright, I read CDI-697 too (was a bit too quick to answer here) and I am pretty sure the behavior is correct.
Basically, it is as I said - due to the usage of
you get all the fields, even in supertypes.AnnotatedType#getFields()
But granted, it is not clear that
AnnotatedTypeConfigurator#fields() will behave in the same manner.