|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.digester.Substitutor
public abstract class Substitutor
(Logical) Interface for substitution strategies. (It happens to be implemented as a Java abstract class to allow future additions to be made without breaking backwards compatibility.)
Usage: When Digester.setSubstitutor(org.apache.commons.digester.Substitutor)
is set, Digester
calls the methods in this interface to create substitute values which will
be passed into the Rule implementations.
Of course, it is perfectly acceptable for implementations not to make
substitutions and simply return the inputs.
Different strategies are supported for attributes and body text.
Constructor Summary | |
---|---|
Substitutor()
|
Method Summary | |
---|---|
abstract Attributes |
substitute(Attributes attributes)
Substitutes the attributes (before they are passed to the Rule implementations's). |
abstract 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 Substitutor()
Method Detail |
---|
public abstract Attributes substitute(Attributes attributes)
Substitutes the attributes (before they are passed to the
Rule
implementations's).
Digester
will only call this method a second time
once the original Attributes
instance can be safely reused.
The implementation is therefore free to reuse the same Attributes
instance
for all calls.
attributes
- 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 abstract String substitute(String bodyText)
bodyText
- 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 |