|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.digester.Substitutor
org.apache.commons.digester.substitution.VariableSubstitutor
public class VariableSubstitutor
Substitutor implementation that support variable replacement
for both attributes and body text.
The actual expansion of variables into text is delegated to VariableExpander
implementations.
Supports setting an expander just for body text or just for attributes.
Also supported is setting no expanders for body text and for attributes.
| Constructor Summary | |
|---|---|
VariableSubstitutor(VariableExpander expander)
Constructs a Substitutor which uses the same VariableExpander for both body text and attibutes. |
|
VariableSubstitutor(VariableExpander attributesExpander,
VariableExpander bodyTextExpander)
Constructs a Substitutor. |
|
| Method Summary | |
|---|---|
Attributes |
substitute(Attributes attributes)
Substitutes the attributes (before they are passed to the Rule implementations's) |
String |
substitute(String bodyText)
Substitutes for the body text. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public VariableSubstitutor(VariableExpander expander)
expander - VariableExpander implementation,
null if no substitutions are to be performed
public VariableSubstitutor(VariableExpander attributesExpander,
VariableExpander bodyTextExpander)
attributesExpander - VariableExpander implementation to be used for attributes,
null if no attribute substitutions are to be performedbodyTextExpander - VariableExpander implementation to be used for bodyTextExpander,
null if no attribute substitutions are to be performed| Method Detail |
|---|
public Attributes substitute(Attributes attributes)
Rule implementations's)
substitute in class Substitutorattributes - the Attributes passed into Digester by the SAX parser,
not null (but may be empty)
Attributes to be passed to the Rule implementations.
This method may pass back the Attributes passed in.
Not null but possibly empty.public String substitute(String bodyText)
substitute in class SubstitutorbodyText - the body text (as passed to Digester)
Rule implementations
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||