Class ModuleRegister

java.lang.Object
org.opt4j.config.ModuleRegister
All Implemented Interfaces:
Iterable<Class<? extends com.google.inject.Module>>

public class ModuleRegister extends Object implements Iterable<Class<? extends com.google.inject.Module>>
The ModuleRegister contains all found modules for the Configurator.
  • Field Details

    • map

      protected final Map<Class<? extends com.google.inject.Module>,PropertyModule> map
    • set

      protected final Set<Class<? extends com.google.inject.Module>> set
    • finder

      protected final ModuleList finder
    • isInit

      protected boolean isInit
  • Constructor Details

    • ModuleRegister

      @Inject public ModuleRegister(ModuleList finder)
      Constructs and populates the ModuleRegister.
      Parameters:
      finder - the module finder to be used
  • Method Details

    • iterator

      public Iterator<Class<? extends com.google.inject.Module>> iterator()
      Specified by:
      iterator in interface Iterable<Class<? extends com.google.inject.Module>>
    • size

      public int size()
      Returns the number of found modules.
      Returns:
      the number of found modules
      See Also:
    • get

      public PropertyModule get(Class<? extends com.google.inject.Module> clazz)
      Returns the PropertyModule of the specified class and creates a new instance if necessary.
      Parameters:
      clazz - the class of the module
      Returns:
      the property module