Package com.google.inject.internal
Class RealMultibinder.PermitDuplicatesModule
java.lang.Object
com.google.inject.AbstractModule
com.google.inject.internal.RealMultibinder.PermitDuplicatesModule
- All Implemented Interfaces:
Module
- Enclosing class:
- RealMultibinder<T>
We install the permit duplicates configuration as its own binding, all by itself. This way, if
only one of a multibinder's users remember to call permitDuplicates(), they're still permitted.
This is like setting a global variable in the injector so that each instance of the multibinder will have the same value for permitDuplicates, even if it is only set on one of them.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
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
-
Field Details
-
key
-
-
Constructor Details
-
PermitDuplicatesModule
-
-
Method Details
-
configure
protected void configure()Description copied from class:AbstractModule
Configures aBinder
via the exposed methods.- Overrides:
configure
in classAbstractModule
-
equals
-
hashCode
public int hashCode()
-