From line 0 changed to line 0:
Work in progress list of enhancements to |javax.enterprise.inject.spi| for the CDI 1.0 maintenance release.
Work in progress list of enhancements to |javax.enterprise.inject.spi| for the CDI 1.0 maintenance release and CDI 1.1.
From lines 2 to 13 deleted to line 2:
++ Ability to wrap the |InjectionPoint|
Add |ProcessInjectionPoint| event.
Also add |BeanManager.createInjectionPoint(annotatedMember)|.
++ Ability to process alternatives, interceptors and decorators of a module
Add |Module| object with |getAlternatives()|, |getInterceptors()| and |getDecorators()|
Add |ProcessModule| event.
Add |BeanManager.getModule()|.
From line 52 changed to line 40:
++ Ability to override attributes of a |Bean|.
++ Ability to override attributes of a |Bean|
From line 56 changed to line 44:
Either from |ProcessBean| event, or, better from a |ProcessBeanAttributes| event which lets you wrap the |BeanAttributes| or give the container a new one created with |BeanManager.createBeanAttributes()|.
We should make it possible to mess with the scope/qualifiers/name/etc of a bean either from |ProcessBean| event, or, better from a |ProcessBeanAttributes| event which lets you wrap the |BeanAttributes| or give the container a new one created with |BeanManager.createBeanAttributes()|.
From line 58 changed to line 46:
++ Ability to process module-level metadata
++ Ability to process modules
From line 60 changed to line 48:
Add a |Module| object which exposes enabled alternatives, interceptors and decorators. This object should also expose all |AnnotatedType|s and |Extension|s in the module. Also a |ProcessModule| event to let you mess with them :-)
Add |ProcessModule| event which let's you mess with the enabled alternatives/interceptors/decorators and more:
From line 62 changed to lines 50 to 76:
We should also consider adding |Bean.getModule()| instead of using |getBeanClass()| as a proxy for the module.
`public interface ProcessModule {
public Set<Class> getAlternatives();
public List<Class> getInterceptors();
public List<Class> getDecorators();
public Set<AnnotatedType> getAnnotatedTypes();
public Set<Extension> getExtensions();
}`
++ Ability to wrap the |InjectionPoint|
Add |ProcessInjectionPoint| event, along with |BeanManager.createInjectionPoint(annotatedMember)|.
++ Allow injection of |Instance<X>| into portable extensions
It's more convenient for a portable extension to use |Instance| than |BeanManager.getBeans()| followed by |BeanManager.getInstance()|.
++ Clarify that there can be multiple |AnnotatedType| instances per Java class
This is not 100% clear in the spec.
++ Obtain |Extension| instances from |BeanManager|
Add |public <T extends Extension> T getExtension(Class<T> extensionClass)| to |BeanManager|.
++ Use |Module| object, instead of |Class| for inter-module dependency resolution
We should add |Module| and |Bean.getModule()| instead of using |getBeanClass()| as a proxy for the module when doing inter-module dependency resolution.