You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Bill Holloway <bi...@gmail.com> on 2008/12/29 00:55:35 UTC

T5: Can I scan all services for a custom annotation?

I've got a module library with an annotation that I can attach to any T5
service.  I need to scan all an application's T5 services to pick out the
ones that have that annotation.  What's the best way to accomplish this?

Thanks,

Bill

Re: T5: Can I scan all services for a custom annotation?

Posted by Howard Lewis Ship <hl...@gmail.com>.
A decorator is the current proper approach to this.  The only problem
is that using a too-wide decorator (one that decorates
MasterObjectProvider, or any service contributed into
MasterObjectProvider) can easily cause a cyclic instantiation problem.

In any case, I've been thinking of making it easier to do this, by
allowing certain services to mark themselves "exempt from decoration"
... such services would include MasterObjectProvider & friends. That
way you could decorate @Match("*") easily.

I've also been thinking of adding support for special services to
handle post-service creation ... i.e., that can be assured of being
passed the core service implementation.  This would apply more to the
other interesting use cases related to automatically generating web
service interfaces to Tapestry IoC services.

On Sun, Dec 28, 2008 at 3:55 PM, Bill Holloway <bi...@gmail.com> wrote:
> I've got a module library with an annotation that I can attach to any T5
> service.  I need to scan all an application's T5 services to pick out the
> ones that have that annotation.  What's the best way to accomplish this?
>
> Thanks,
>
> Bill
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org