[cdi-dev] getBeanClass return value for build-in beans?
arjan.tijms at gmail.com
Tue Aug 11 06:26:48 EDT 2015
This is split-off from the thread "Bean<T> that only qualifies super
types?", where the question came up what a Bean<T> should return from
the getBeanClass() method for the case of build-in beans.
The JavaDoc for getBeanClass() currently says the following:
"The bean class of the managed bean or session bean or of the bean
that declares the producer method or field."
The case where a Bean<T> instance is directly created and added as
bean to AfterBeanDiscovery in an extension does not seem to be covered
by this documentation.
Weld returns "this.class" here.
Is that what build-in beans should always do, and if so, should the
JavaDoc/spec be clarified for this?
More information about the cdi-dev