Class PostConstructListener

  • All Implemented Interfaces:
    com.google.inject.spi.TypeListener

    public final class PostConstructListener
    extends Object
    implements com.google.inject.spi.TypeListener
    TypeListener implementation enabling Guice support for JSR-250 @PostConstruct annotation. Typically, this listener should be installed in the Guice module in the following way:
     public class MyModule extends AbstractModule {
       protected void configure() {
         // (...)
         bindListener(Matchers.any(), new PostConstructListener());
         // (...)
       }
     }
     
    Since:
    2.1.0-SNAPSHOT
    Version:
    %I%, %G%
    Author:
    Piotr Dyraga
    • Constructor Detail

      • PostConstructListener

        public PostConstructListener()
    • Method Detail

      • hear

        public <I> void hear​(com.google.inject.TypeLiteral<I> type,
                             com.google.inject.spi.TypeEncounter<I> encounter)
        Specified by:
        hear in interface com.google.inject.spi.TypeListener