Class RealMultibinder.PermitDuplicatesModule

java.lang.Object
com.google.inject.AbstractModule
com.google.inject.internal.RealMultibinder.PermitDuplicatesModule
All Implemented Interfaces:
Module
Enclosing class:
RealMultibinder<T>

private static class RealMultibinder.PermitDuplicatesModule extends AbstractModule
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 Details

  • Constructor Details

    • PermitDuplicatesModule

      PermitDuplicatesModule(Key<Boolean> key)
  • Method Details