[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tapestry-user
Subject:    Re: How get service by marker annotation
From:       Howard Lewis Ship <hlship () gmail ! com>
Date:       2009-02-28 16:26:06
Message-ID: ecd0e3310902280826p45afeaa1n4578a0940051ead0 () mail ! gmail ! com
[Download RAW message or body]

That is not currently part of the API.  You can simulate it by using
the     <T> T getObject(Class<T> objectType, AnnotationProvider
annotationProvider)
method.  That's a bit trickier and the API needs to change to support
your needs (please add an issue).

Generally, this isn't necessary because you can:

@Inject @SomeMarker
private SomeService service;

in a component, or:

public MyFacadeService(@SomeMarker SomeService service) { }

in a service.

On Fri, Feb 27, 2009 at 10:49 PM, foror <foror@mail.ru> wrote:
> I have @SomeMarker annotation:
>
> @Marker({@SomeMarker})
> void SomeService buildSomeService() {...}
>
> How get SomeService by his marker (in ObjectLocator I not found like
> method).
>
> method like this: <T> T getService(<? extends Annotation> marker, Class<T>
> interface)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic