Class CompoundSubstitutor
java.lang.Object
org.apache.commons.digester3.Substitutor
org.apache.commons.digester3.substitution.CompoundSubstitutor
This Substitutor chains two Substitutors
a and b.
All values to substitute are first handled by a and passed to
b afterwards.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SubstitutorSubstitutor aprivate final SubstitutorSubstitutor b -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new CompoundSubstitutor instance. -
Method Summary
Modifier and TypeMethodDescriptionsubstitute(String bodyText) Substitutes for the body text.substitute(Attributes attributes) Substitutes the attributes (before they are passed to theRuleimplementations's).
-
Field Details
-
a
Substitutor a -
b
Substitutor b
-
-
Constructor Details
-
CompoundSubstitutor
Creates a new CompoundSubstitutor instance. All values overgiven tosubstitute()are first handled byaand passed tobafterwards. Both Substitutor have to be not null.- Parameters:
a- Substitutor ab- Substitutor b
-
-
Method Details
-
substitute
Substitutes the attributes (before they are passed to the
Ruleimplementations's).Digesterwill only call this method a second time once the originalAttributesinstance can be safely reused. The implementation is therefore free to reuse the sameAttributesinstance for all calls.- Specified by:
substitutein classSubstitutor- Parameters:
attributes- theAttributespassed intoDigesterby the SAX parser, not null (but may be empty)- Returns:
Attributesto be passed to theRuleimplementations. This method may pass back the Attributes passed in. Not null but possibly empty.
-
substitute
Substitutes for the body text. This method may substitute values into the body text of the elements that Digester parses.- Specified by:
substitutein classSubstitutor- Parameters:
bodyText- the body text (as passed toDigester)- Returns:
- the body text to be passed to the
Ruleimplementations
-