Class ModuleRegister

  • All Implemented Interfaces:
    java.lang.Iterable<java.lang.Class<? extends com.google.inject.Module>>

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

      Fields 
      Modifier and Type Field Description
      protected ModuleList finder  
      protected boolean isInit  
      protected java.util.Map<java.lang.Class<? extends com.google.inject.Module>,​PropertyModule> map  
      protected java.util.Set<java.lang.Class<? extends com.google.inject.Module>> set  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      PropertyModule get​(java.lang.Class<? extends com.google.inject.Module> clazz)
      Returns the PropertyModule of the specified class and creates a new instance if necessary.
      java.util.Iterator<java.lang.Class<? extends com.google.inject.Module>> iterator()  
      int size()
      Returns the number of found modules.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Field Detail

      • map

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

        protected final java.util.Set<java.lang.Class<? extends com.google.inject.Module>> set
      • isInit

        protected boolean isInit
    • Constructor Detail

      • ModuleRegister

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

      • iterator

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

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

        public PropertyModule get​(java.lang.Class<? extends com.google.inject.Module> clazz)
        Returns the PropertyModule of the specified class and creates a new instance if necessary. If the property module can not be created, null is returned.
        Parameters:
        clazz - the class of the module
        Returns:
        the property module or null