net.larsan.urd.ant.website
Class StringSub
java.lang.Object
|
+--net.larsan.urd.ant.website.StringSub
- All Implemented Interfaces:
- Substitution
- public class StringSub
- extends java.lang.Object
- implements Substitution
A string substitution searches for all occations of a label and
replaces it with a string value.
- Version:
- Alpha-0.1 / 2002-10-06 21:37
- Author:
- Lars J. Nilsson
- See Also:
PropertySub
|
Constructor Summary |
StringSub(java.lang.String label,
java.lang.String value)
Create substitution. |
|
Method Summary |
java.lang.String |
getLabel()
|
java.lang.String |
getValue()
|
void |
setLabel(java.lang.String label)
|
void |
setValue(java.lang.String value)
|
java.lang.String |
substitute(java.lang.String source)
Perform a substitution. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StringSub
public StringSub(java.lang.String label,
java.lang.String value)
- Create substitution. The label is what will be replaced in the
sources by the value. The label may contain regular expressions.
substitute
public java.lang.String substitute(java.lang.String source)
- Perform a substitution. All occurances of the label will be
replaced with the value.
- Specified by:
substitute in interface Substitution
getLabel
public java.lang.String getLabel()
getValue
public java.lang.String getValue()
setLabel
public void setLabel(java.lang.String label)
setValue
public void setValue(java.lang.String value)