[cdi-dev] AnnotatedTypeConfigurator limitation

Martin Kouba mkouba at redhat.com
Wed Nov 16 06:34:03 EST 2016


Well, I thought the EG already agreed that the purpose of the 
configurator API is not to cover all possible use cases, but the most 
common ones. And the list of use cases below seems more like a list of 
corner cases.

Anyway, if the EG decides to support this, I think we could either go 
with 1) or 3) *.

*
BeanManager.getAnnotatedTypeBuilder() that returns a new builder 
wrapping a configurator instance.

Martin

Dne 16.11.2016 v 11:30 Antoine Sabot-Durand napsal(a):
> Hi Guys,
>
> Following CDI-642 and 643 I started to explore place where annotatedType
> can be used and where we don't provide access to
> AnnotatedTypeConfigurator [1], I really think we should solve this use
> case to avoid advanced users frustration discovering a new feature they
> can use everywhere (that was my case when realised that I could use it
> in BBD for Qualifier or interceptorBinding addition).
>
> Possible solutions:
> 1) Add a hook to each of these place to obtain an AnnotatedTypeConfigurator
> 2) Add BM.createAnnotatypeConfigurator(Class) and
> BM.createAnnotatedType(ATC)
> 3) Add a Builder class that would provide a configure method
> 4) Transform AnnotatedTypeConfigurator into a Builder and simplify SPI
> using AnnotatedTypeConfigurator.
>
> Antoine
>
>  [1] Non exhaustive list :
> - BeforeTypeDiscovery for addQualifier and addInterceptorBinding
> - UnManaged class
> - BeanManager createInjectionTartet and getInjectionTargetFactory or in
> InjectionTarget
> - BeanManager getProducerFactory where a configured AnnotatedField or
> AnnotatedMethod could be useful
>
>
> _______________________________________________
> cdi-dev mailing list
> cdi-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/cdi-dev
>
> Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.
>

-- 
Martin Kouba
Software Engineer
Red Hat, Czech Republic


More information about the cdi-dev mailing list