Class MapperInstaller

  • All Implemented Interfaces:
    ru.vyarus.dropwizard.guice.module.installer.FeatureInstaller, ru.vyarus.dropwizard.guice.module.installer.install.binding.BindingInstaller

    public class MapperInstaller
    extends java.lang.Object
    implements ru.vyarus.dropwizard.guice.module.installer.FeatureInstaller, ru.vyarus.dropwizard.guice.module.installer.install.binding.BindingInstaller
    Recognize classes implementing JDBI's ResultSetMapper and register them. Register mappers as singletons. Reports all installed mappers to console.

    Mappers are normal guice beans and so may use constructor injection, aop etc.

    Since:
    4.12.2016
    See Also:
    for actual installation
    • Constructor Summary

      Constructors 
      Constructor Description
      MapperInstaller()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void bind​(com.google.inject.Binder binder, java.lang.Class<?> type, boolean lazy)  
      void extensionBound​(com.google.inject.Stage stage, java.lang.Class<?> type)  
      <T> void manualBinding​(com.google.inject.Binder binder, java.lang.Class<T> type, com.google.inject.Binding<T> binding)  
      boolean matches​(java.lang.Class<?> type)  
      void report()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MapperInstaller

        public MapperInstaller()
    • Method Detail

      • matches

        public boolean matches​(java.lang.Class<?> type)
        Specified by:
        matches in interface ru.vyarus.dropwizard.guice.module.installer.FeatureInstaller
      • bind

        public void bind​(com.google.inject.Binder binder,
                         java.lang.Class<?> type,
                         boolean lazy)
        Specified by:
        bind in interface ru.vyarus.dropwizard.guice.module.installer.install.binding.BindingInstaller
      • manualBinding

        public <T> void manualBinding​(com.google.inject.Binder binder,
                                      java.lang.Class<T> type,
                                      com.google.inject.Binding<T> binding)
        Specified by:
        manualBinding in interface ru.vyarus.dropwizard.guice.module.installer.install.binding.BindingInstaller
      • extensionBound

        public void extensionBound​(com.google.inject.Stage stage,
                                   java.lang.Class<?> type)
        Specified by:
        extensionBound in interface ru.vyarus.dropwizard.guice.module.installer.install.binding.BindingInstaller
      • report

        public void report()
        Specified by:
        report in interface ru.vyarus.dropwizard.guice.module.installer.FeatureInstaller