Hi all guys,
does the TypeListener support request injection before the hear()
method is executed? I mean, in Guice 2.0 the following code doesn't
work, any chance to making this working with next release? Thanks in
advance!

class MyTypeListener implements TypeListener {
    @Inject Service service;

    public void setService(Service service) {
        this.service = service;
    }

    public <T> void hear(TypeLiteral<T> typeLiteral, TypeEncounter<T>
typeEncounter) {
      // something magic that requires this.service
    }
  }

@Override
protected void configure() {
    MyTypeListener myTypeListener = new TypeListener();
    binder().requestInjection(myTypeListener);
    bindListener(Matchers.any(), myTypeListener);
  }

http://people.apache.org/~simonetripodi/
http://www.99soft.org/

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-guice?hl=en.

Reply via email to