According to the java docs, I would also suppose your expression to be true. Otherwise InjectionPoint#isDelegate() would always return false, making this method dispensable. The interesting point imho is injecting the InjectionPoint in other cases than producer methods. I have not seen examples for this usage in the spec.<br>
<br>br, Sven<br><br><br><div class="gmail_quote">2010/4/9 Pete Muir <span dir="ltr"><<a href="mailto:pmuir@redhat.com">pmuir@redhat.com</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div></div><div class="h5">Given these beans and decorators (enabled)<br>
<br>
interface Animal {<br>
String hello();<br>
}<br>
<br>
class Cat implements Animal {<br>
@Inject private InjectionPoint injectionPoint;<br>
<br>
public String hello() {<br>
return "hello";<br>
}<br>
<br>
public InjectionPoint getInjectionPoint() {<br>
return injectionPoint;<br>
}<br>
}<br>
<br>
@Decorator<br>
class AnimalDecorator implements Animal {<br>
<br>
@Inject @Delegate<br>
private Animal bean;<br>
<br>
public String hello() {<br>
return bean.hello() + " world!";<br>
}<br>
}<br>
<br>
class Cattery {<br>
<br>
@Inject Cat cat;<br>
<br>
Cat getCat() {<br>
return cat;<br>
}<br>
<br>
}<br>
<br>
Should<br>
<br>
cattery.getCat().getInjectionPoint().isDelegate() return true or false?<br>
<br>
I believe it should return true, as Cat is being decorated, and hence injected into the decorator delegate injection point.<br>
<br>
Ref is <a href="https://jira.jboss.org/jira/browse/CDITCK-138" target="_blank">https://jira.jboss.org/jira/browse/CDITCK-138</a><br>
_______________________________________________<br>
weld-dev mailing list<br>
<a href="mailto:weld-dev@lists.jboss.org">weld-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/weld-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/weld-dev</a><br>
</div></div></blockquote></div><br>