<div class="gmail_quote">On Tue, Apr 13, 2010 at 8:31 PM, Stuart Douglas <span dir="ltr">&lt;<a href="mailto:stuart@baileyroberts.com.au">stuart@baileyroberts.com.au</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I think that the easiest way to address this would be to allow the interceptor to inject the Bean and AnnotatedType object for the intercepted object.<br>
<br>
 e.g.<br>
@Inject @InterceptedMetadata Bean bean;<br>
<br>
@Inject @InterceptedMetadata AnnotatedType type;<br>
<br>
In theory the AnnotatedType could be null, but in practice custom beans don&#39;t support interceptors, so this should be fine.<br>
<br>
This allows the interceptor to read the annotation information from the AnnotatedType. We could also allow beans to inject this information as well, but I think that this can be implemented as a portable extension without any spec changes.<br>
<br></blockquote><div>The approach taken by decorators immediately comes to mind. I think the availability of this information would really revolutionize the Java EE approach to interception. I know if I showed this in a presentation I would get some raised brows ;)</div>
<div><br></div><div>-Dan</div><div> </div></div>-- <br>Dan Allen<br>Senior Software Engineer, Red Hat | Author of Seam in Action<br>Registered Linux User #231597<br><br><a href="http://mojavelinux.com">http://mojavelinux.com</a><br>
<a href="http://mojavelinux.com/seaminaction">http://mojavelinux.com/seaminaction</a><br><a href="http://www.google.com/profiles/dan.j.allen">http://www.google.com/profiles/dan.j.allen</a><br>