Looks like the root problem is that TypeListner gets injected after it
hears all the stuff.
How about using a place holder (proxy) or something like that.
public class ConsumerTypeListener implements TypeListener
{
private InjectionListenerProxy holder = new InjectionListenerProxy
();
public <I> void hear(TypeLiteral<I> type, TypeEncounter<I>
encounter)
{
encounter.register(holder);
}
@Inject
public void injectedAfterInjectorReady(ConsumerInjectionListener
listener){
holder.delegateTo(listener);
}
}
now when you request an instance the proxy will delegate the call to
your real listener.
Cheers
Alen
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---