public interface Substitutor
SubstitutionHandler
s.SubstitutionHandler
Modifier and Type | Method and Description |
---|---|
void |
close()
Cleanup substitutor state and release all handlers.
|
void |
setSubstitutionHandlers(List subsHandlers)
Set the list of
SubstitutionHandler s to use for substitution. |
void |
setSubstitutionHandlers(String subsHandlerNames)
Set the list of
SubstitutionHandler s to use for substitution. |
String |
substitute(String original)
Recursively replaces all tokens in the string
original
with the results from matching handlers. |
void setSubstitutionHandlers(String subsHandlerNames)
SubstitutionHandler
s to use for substitution.subsHandlerNames
- Comma-separated list of substitution handler class names.void setSubstitutionHandlers(List subsHandlers)
SubstitutionHandler
s to use for substitution.subsHandlers
- List of handler instances.String substitute(String original) throws SubstitutionException
original
with the results from matching handlers. Any tokens that are not
recognized by any handlers will remain in the string.original
- String with tokens to be substituted.SubstitutionException
- if an error occurs during substitutionvoid close()