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
Convenience Guice module support class, which installs the
AnnotationsModule, and handles exceptions as the
AbstractCheckedModule does.- Author:
- Michael Vorburger.ch
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected <T> voidbindTypesToInstance(Class<T> interfaceClass, Class<? extends T> implementationClass, T instance) Binds instance to both the interfaceClass as well as the implementationClass.protected final voidprotected abstract voidMethods inherited from class org.opendaylight.infrautils.inject.guice.testutils.AbstractCheckedModule
configureMethods 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
-
Constructor Details
-
AbstractGuiceJsr250Module
public AbstractGuiceJsr250Module()
-
-
Method Details
-
checkedConfigure
- Specified by:
checkedConfigurein classAbstractCheckedModule- Throws:
Exception
-
configureBindings
- 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
-