[weld-dev] Spec clarification needed
Pete Muir
pmuir at redhat.com
Fri Apr 9 04:46:09 EDT 2010
Given these beans and decorators (enabled)
interface Animal {
String hello();
}
class Cat implements Animal {
@Inject private InjectionPoint injectionPoint;
public String hello() {
return "hello";
}
public InjectionPoint getInjectionPoint() {
return injectionPoint;
}
}
@Decorator
class AnimalDecorator implements Animal {
@Inject @Delegate
private Animal bean;
public String hello() {
return bean.hello() + " world!";
}
}
class Cattery {
@Inject Cat cat;
Cat getCat() {
return cat;
}
}
Should
cattery.getCat().getInjectionPoint().isDelegate() return true or false?
I believe it should return true, as Cat is being decorated, and hence injected into the decorator delegate injection point.
Ref is https://jira.jboss.org/jira/browse/CDITCK-138
More information about the weld-dev
mailing list