Implementation note: for Weld SE and Servlet, we could probably allow an extension to declare a special method, .e.g. something like Set<Class<? extends Annotation>> getAdditionalBeanDefiningAnnotations(), and process the returned set before the actual "deployment discovery". However, this could be far more complicated in Java EE servers. Eg. the implict bean archives could be processed/filtered before the final set of extensions is determined. See for example the WildFly integration: org.jboss.as.weld.deployment.processors.BeanArchiveProcessor, org.jboss.as.weld.deployment.processors.WeldImplicitDeploymentProcessor and org.jboss.as.weld.deployment.processors.WeldPortableExtensionProcessor. |