[
https://issues.jboss.org/browse/CDI-92?page=com.atlassian.jira.plugin.sys...
]
Marius Bogoevici edited comment on CDI-92 at 9/20/11 2:14 PM:
--------------------------------------------------------------
@Inject @Delegate means something else in the case of a Decorator anyway (and there's
no delegate in the case of an interceptor). Also, I cannot see why there cannot be two
separate concerns:
a) Inject the bean (which in the case of an Interceptor/Decorator will inject the
Interceptor/Decorator itself, they're beans too, nothing wrong with that)
b) Inject the target instance or delegate. Since we don't have a common term for
interception or decoration we could have two distinct qualifiers:
@Inject @Intercepted Bean<?> bean; for interceptors
@Inject @Decorated Bean<?> bean; for decorators
One point against this would be the proliferation of annotations, but I think that using
distinct annotations helps keeping the spec clear.
was (Author: marius.bogoevici):
@Inject @Delegate means something else in the case of a Decorator anyway (and
there's no delegate in the case of an interceptor). Also, I cannot see why there
cannot be two separate concerns:
a) Inject the bean (which in the case of an Interceptor/Decorator will inject the
Interceptor/Decorator itself, they're beans too, nothing wrong with that)
b) Inject the target instance or delegate. Since we don't have a common term for
interception or decoration we could have two distinct identifiers:
@Inject @Intercepted Bean<?> bean; for interceptors
@Inject @Decorated Bean<?> bean; for decorators
One point against this would be the proliferation of annotations, but I think that using
distinct annotations helps keeping the spec clear.
Allow injection of Bean object for a bean
-----------------------------------------
Key: CDI-92
URL:
https://issues.jboss.org/browse/CDI-92
Project: CDI Specification Issues
Issue Type: Feature Request
Components: Beans
Affects Versions: 1.0
Reporter: Pete Muir
Fix For: 1.1 (Confirmed)
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira