Class AbstractGuiceJsr250Module

  • All Implemented Interfaces:
    com.google.inject.Module

    public abstract class AbstractGuiceJsr250Module
    extends AbstractCheckedModule
    Convenience Guice module support class, which installs the AnnotationsModule, and handles exceptions as the AbstractCheckedModule does.
    Author:
    Michael Vorburger.ch
    • Constructor Detail

      • AbstractGuiceJsr250Module

        public AbstractGuiceJsr250Module()
    • Method Detail

      • configureBindings

        protected abstract void configureBindings()
                                           throws Exception
        Throws:
        Exception
      • bindTypesToInstance

        protected <T> void bindTypesToInstance​(Class<T> interfaceClass,
                                               Class<? extends T> implementationClass,
                                               T instance)
        Binds instance to both the interfaceClass as well as the implementationClass.
        Type Parameters:
        T - type of interfaceClass
        Parameters:
        interfaceClass - class type of an interface
        implementationClass - class type of implementing class
        instance - an instance implementing both interfaceClass & implementationClass