public class ModuleSaver
extends java.lang.Object
PropertyModule
configurations or adding
these to XML Node
s.Constructor and Description |
---|
ModuleSaver() |
Modifier and Type | Method and Description |
---|---|
protected org.w3c.dom.Document |
getEmptyDocument() |
protected org.w3c.dom.Node |
getNode(com.google.inject.Module module,
org.w3c.dom.Document document) |
protected javax.xml.transform.Transformer |
getStandardTransformer() |
boolean |
save(java.io.File file,
java.util.Collection<? extends com.google.inject.Module> modules)
Save the module configurations to a
File . |
boolean |
save(java.lang.String filename,
java.util.Collection<? extends com.google.inject.Module> modules)
Save the module configurations to a file (as filename).
|
java.lang.String |
toXMLString(java.util.Collection<? extends com.google.inject.Module> modules)
Returns the xml representation of the
Module s. |
java.lang.String |
toXMLString(com.google.inject.Module module)
Returns the xml representation of the
Module . |
boolean |
write(java.io.OutputStream out,
java.util.Collection<? extends com.google.inject.Module> modules)
Save the modules configuration to an
OutputStream . |
boolean |
write(java.io.OutputStream out,
com.google.inject.Module module)
Save the module configuration to an
OutputStream . |
public boolean save(java.lang.String filename, java.util.Collection<? extends com.google.inject.Module> modules)
filename
- the name of the filemodules
- the modulestrue
if successfulpublic boolean save(java.io.File file, java.util.Collection<? extends com.google.inject.Module> modules)
File
.file
- the filemodules
- the modulestrue
if successfulpublic boolean write(java.io.OutputStream out, java.util.Collection<? extends com.google.inject.Module> modules)
OutputStream
.out
- the output streammodules
- the modulestrue
if successfulpublic boolean write(java.io.OutputStream out, com.google.inject.Module module)
OutputStream
.out
- the output stream}module
- the moduletrue
if successfulpublic java.lang.String toXMLString(com.google.inject.Module module)
Module
.module
- the modulepublic java.lang.String toXMLString(java.util.Collection<? extends com.google.inject.Module> modules)
Module
s.modules
- the modulesprotected org.w3c.dom.Document getEmptyDocument() throws javax.xml.parsers.ParserConfigurationException
javax.xml.parsers.ParserConfigurationException
protected javax.xml.transform.Transformer getStandardTransformer() throws javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerConfigurationException
protected org.w3c.dom.Node getNode(com.google.inject.Module module, org.w3c.dom.Document document)