Hi,
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."
See:
https://javaee-spec.java.net/nonav/javadocs/javax/enterprise/inject/spi/B...
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.
See
http://grepcode.com/file/repo1.maven.org/maven2/org.jboss.weld.se/weld-se...
Is that what build-in beans should always do, and if so, should the
JavaDoc/spec be clarified for this?
Kind regards,
Arjan Tijms