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 theAnnotationsModule
, and handles exceptions as theAbstractCheckedModule
does.- Author:
- Michael Vorburger.ch
-
-
Constructor Summary
Constructors Constructor Description AbstractGuiceJsr250Module()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods 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 void
checkedConfigure()
protected abstract void
configureBindings()
-
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, requestStaticInjection, requireBinding, requireBinding
-
-
-
-
Method Detail
-
checkedConfigure
protected final void checkedConfigure() throws Exception
- Specified by:
checkedConfigure
in classAbstractCheckedModule
- 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 interfaceimplementationClass
- class type of implementing classinstance
- an instance implementing both interfaceClass & implementationClass
-
-