Class AbstractGuiceJsr250Module

java.lang.Object
com.google.inject.AbstractModule
org.opendaylight.infrautils.inject.guice.testutils.AbstractCheckedModule
org.opendaylight.infrautils.inject.guice.testutils.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 Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected <T> void
    bindTypesToInstance(Class<T> interfaceClass, Class<? extends T> implementationClass, T instance)
    Binds instance to both the interfaceClass as well as the implementationClass.
    protected final void
     
    protected abstract void
     

    Methods inherited from class org.opendaylight.infrautils.inject.guice.testutils.AbstractCheckedModule

    configure

    Methods inherited from class com.google.inject.AbstractModule

    addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestInjection, requestStaticInjection, requireBinding, requireBinding

    Methods inherited from class java.lang.Object

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

    • AbstractGuiceJsr250Module

      public AbstractGuiceJsr250Module()
  • Method Details

    • checkedConfigure

      protected final void checkedConfigure() throws Exception
      Specified by:
      checkedConfigure in class AbstractCheckedModule
      Throws:
      Exception
    • 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