TypeListeners are only called when Guice creates an object (using its constructor) or injects fields into it. If an object is returned by a @Provides method or other Provider, TypeListeners aren't notified about the that object.
You may want to use ProvisionListener <http://google.github.io/guice/api-docs/4.0/javadoc/com/google/inject/spi/ProvisionListener.html> instead, which will be notified whenever any type is ready to be injected. sam On Mon, Aug 24, 2015 at 2:20 PM Nat <[email protected]> wrote: > I found that in certain cases, TypeListener is not called even though the > type is not injected staticly. I wonder what those exception cases are. So > far I guess it has something to do with the use of MapBinderBinding. > > -- > You received this message because you are subscribed to the Google Groups > "google-guice" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/google-guice. > To view this discussion on the web visit > https://groups.google.com/d/msgid/google-guice/0345c126-22cc-4181-a223-823d5a47a2a1%40googlegroups.com > <https://groups.google.com/d/msgid/google-guice/0345c126-22cc-4181-a223-823d5a47a2a1%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "google-guice" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-guice. To view this discussion on the web visit https://groups.google.com/d/msgid/google-guice/CAJEBNUdPM%3D63pcYoMB3XDZHr4s5tKc83nOAcWdEibYyjytTB7w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
