public class Builder extends Object
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
replaceTag(String template,
String tag,
String value,
boolean expected,
int maxreplacements)
Replaces a given number of occurences of a special tag in an XML or HTML template by a value.
|
protected String replaceTag(String template, String tag, String value, boolean expected, int maxreplacements) throws BuildException
template - html templatetag - special tagvalue - value replacing the tagexpected - specifies if the tag is expected to present; if true and the tag
is not present, an exception is thrown; if false and the tag is
not present, the original string is returnedmaxreplacements - Set -1 to replace each occurence of tag, or limit replacements by a given positive numberBuildException - when template does not contain the tagCopyright © 2016. All Rights Reserved.