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 Node
s.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Document
protected Node
protected Transformer
boolean
save
(File file, Collection<? extends com.google.inject.Module> modules) Save the module configurations to aFile
.boolean
save
(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 theModule
s.boolean
write
(OutputStream out, com.google.inject.Module module) Save the module configuration to anOutputStream
.boolean
write
(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:
true
if successful
-
save
Save the module configurations to aFile
.- Parameters:
file
- the filemodules
- the modules- Returns:
true
if successful
-
write
Save the modules configuration to anOutputStream
.- Parameters:
out
- the output streammodules
- the modules- Returns:
true
if successful
-
write
Save the module configuration to anOutputStream
.- Parameters:
out
- the output stream}module
- the module- Returns:
true
if successful
-
toXMLString
Returns the xml representation of theModule
.- Parameters:
module
- the module- Returns:
- the xml representation
-
toXMLString
Returns the xml representation of theModule
s.- Parameters:
modules
- the modules- Returns:
- the xml representation
-
getEmptyDocument
- Throws:
ParserConfigurationException
-
getStandardTransformer
-
getNode
-