org.ow2.util.substitution.engine
Class DefaultSubstitutionEngine
java.lang.Object
org.ow2.util.substitution.engine.DefaultSubstitutionEngine
- All Implemented Interfaces:
- ISubstitutionEngine
public class DefaultSubstitutionEngine
- extends Object
- implements ISubstitutionEngine
This substitution engine supports customization of the property marker.
By default, it uses ${}as property marker.
- Author:
- Loris Bouzonnet, Guillaume Sauthier
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_MARKER
public static final char DEFAULT_MARKER
- See Also:
- Constant Field Values
DEFAULT_OPENING
public static final char DEFAULT_OPENING
- See Also:
- Constant Field Values
DEFAULT_ENDING
public static final char DEFAULT_ENDING
- See Also:
- Constant Field Values
DefaultSubstitutionEngine
public DefaultSubstitutionEngine()
setMarkerChar
public void setMarkerChar(char markerChar)
setOpeningChar
public void setOpeningChar(char openingChar)
setEndingChar
public void setEndingChar(char endingChar)
setResolver
public void setResolver(IPropertyResolver resolver)
substitute
public String substitute(String variableValue)
- Subsitute variables found in this String with their values.
- Specified by:
substitute in interface ISubstitutionEngine
- Parameters:
variableValue - chain to be evaluated
- Returns:
- the given String with variable substituted with values
- Throws:
IllegalArgumentException - when the String cannot be parsed or
when variables cannot be evaluated
Copyright © 2007-2012 OW2 Consortium. All Rights Reserved.