Class ModuleLoader

java.lang.Object
org.opt4j.config.ModuleLoader

public class ModuleLoader extends Object
Helper class for loading PropertyModule configurations from files or retrieving these from XML Nodes.
  • Field Details

  • Constructor Details

    • ModuleLoader

      public ModuleLoader(ModuleRegister moduleRegister)
      Constructs a ModuleLoader.
      Parameters:
      moduleRegister - the register of all found modules
  • Method Details

    • load

      public Collection<? extends com.google.inject.Module> load(String filename)
      Loads all modules from a file (as filename).
      Parameters:
      filename - the file (as filename)
      Returns:
      the modules
    • load

      public Collection<? extends com.google.inject.Module> load(File file)
      Loads all modules from a File.
      Parameters:
      file - the input file
      Returns:
      a list of the modules
    • get

      public Collection<? extends com.google.inject.Module> get(Node node)
      Loads all modules from an XML Node.
      Parameters:
      node - the XML node
      Returns:
      a list of the modules