Thanks.
For now I am just using @InjectService("UserState") and it does the job. I
was just hoping the typing could save me from typing. :)
Ben
On 9/28/07, Howard Lewis Ship <[EMAIL PROTECTED]> wrote:
>
> It's about the type erasure; for the most part the <User> and <Item> get's
> stripped off method signatures as they get compiled.
>
> This is a tough nut to crack. Some of the type data needed for this match
> may be available at runtime.
>
> You may need to
>
> public interface ReadWriteUserState extends ReadWriteState<User>
> {
> }
>
> to make this work in the meantime.
>
> On 9/28/07, Ben Tomasini <[EMAIL PROTECTED]> wrote:
> >
> > I have a service which implements an interface with a generic type. The
> > builders look like this:
> >
> > ReadWriteState<User> buildUserState()
> >
> > ReadWriteState<Item> buildItemState()
> >
> > I have the following dependency injection:
> >
> > MyService buildMyService(ReadWriteState<User> userState)
> >
> > The automatic dependency injection sees two matches, since it is not
> > qualifying the type with the generic. Is there any good reason that
> these
> > two services cannot be seen as unique based on their generic type?
> >
> > Ben
> >
>
>
>
> --
> Howard M. Lewis Ship
> Partner and Senior Architect at Feature50
>
> Creator Apache Tapestry and Apache HiveMind
>