org.dawb.common.util.io
Class StreamMacroSubstitutor
java.lang.Object
org.dawb.common.util.io.StreamMacroSubstitutor
public class StreamMacroSubstitutor
- extends java.lang.Object
This parses an XML file (and applies string interpolation (a.k.a. variable substitution. Every
XML field in the XML document is examined during processing. Fields which contain a pattern beginning with "${",
followed by a property key name and terminating with a "}", will trigger string interpolation.
Method Summary |
static void |
process(java.io.Reader in,
java.io.Writer out,
MacroSupplier macroSupplier)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StreamMacroSubstitutor
public StreamMacroSubstitutor()
process
public static void process(java.io.Reader in,
java.io.Writer out,
MacroSupplier macroSupplier)
throws java.io.IOException
- Parameters:
in
- input xml containing macros of the form ${macroname} to be substitutedout
- the source with macros found in macroSupplier change to the suppled valuesmacroSupplier
- - supplier of macros for substition
- Throws:
java.io.IOException