Class ModuleSaver


  • public class ModuleSaver
    extends Object
    Helper class for saving the PropertyModule configurations or adding these to XML Nodes.
    • Constructor Detail

      • ModuleSaver

        public ModuleSaver()
    • Method Detail

      • save

        public boolean save​(String filename,
                            Collection<? extends com.google.inject.Module> modules)
        Save the module configurations to a file (as filename).
        Parameters:
        filename - the name of the file
        modules - the modules
        Returns:
        true if successful
      • save

        public boolean save​(File file,
                            Collection<? extends com.google.inject.Module> modules)
        Save the module configurations to a File.
        Parameters:
        file - the file
        modules - the modules
        Returns:
        true if successful
      • write

        public boolean write​(OutputStream out,
                             Collection<? extends com.google.inject.Module> modules)
        Save the modules configuration to an OutputStream.
        Parameters:
        out - the output stream
        modules - the modules
        Returns:
        true if successful
      • write

        public boolean write​(OutputStream out,
                             com.google.inject.Module module)
        Save the module configuration to an OutputStream.
        Parameters:
        out - the output stream}
        module - the module
        Returns:
        true if successful
      • toXMLString

        public String toXMLString​(com.google.inject.Module module)
        Returns the xml representation of the Module.
        Parameters:
        module - the module
        Returns:
        the xml representation
      • toXMLString

        public String toXMLString​(Collection<? extends com.google.inject.Module> modules)
        Returns the xml representation of the Modules.
        Parameters:
        modules - the modules
        Returns:
        the xml representation
      • getNode

        protected Node getNode​(com.google.inject.Module module,
                               Document document)