Package org.opt4j.config
Class ModuleSaver
java.lang.Object
org.opt4j.config.ModuleSaver
Helper class for saving the
PropertyModule configurations or adding
these to XML Nodes.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Documentprotected Nodeprotected Transformerbooleansave(File file, Collection<? extends com.google.inject.Module> modules) Save the module configurations to aFile.booleansave(String filename, Collection<? extends com.google.inject.Module> modules) Save the module configurations to a file (as filename).toXMLString(com.google.inject.Module module) Returns the xml representation of theModule.toXMLString(Collection<? extends com.google.inject.Module> modules) Returns the xml representation of theModules.booleanwrite(OutputStream out, com.google.inject.Module module) Save the module configuration to anOutputStream.booleanwrite(OutputStream out, Collection<? extends com.google.inject.Module> modules) Save the modules configuration to anOutputStream.
-
Constructor Details
-
ModuleSaver
public ModuleSaver()
-
-
Method Details
-
save
Save the module configurations to a file (as filename).- Parameters:
filename- the name of the filemodules- the modules- Returns:
trueif successful
-
save
Save the module configurations to aFile.- Parameters:
file- the filemodules- the modules- Returns:
trueif successful
-
write
Save the modules configuration to anOutputStream.- Parameters:
out- the output streammodules- the modules- Returns:
trueif successful
-
write
Save the module configuration to anOutputStream.- Parameters:
out- the output stream}module- the module- Returns:
trueif successful
-
toXMLString
Returns the xml representation of theModule.- Parameters:
module- the module- Returns:
- the xml representation
-
toXMLString
Returns the xml representation of theModules.- Parameters:
modules- the modules- Returns:
- the xml representation
-
getEmptyDocument
- Throws:
ParserConfigurationException
-
getStandardTransformer
-
getNode
-