public class PropertyReplacer extends Object
Description: Class to replace ${property} properties by a value in a Map. Idea and code based on Jakarta ANT's ProjectHelper.java.
| Constructor and Description |
|---|
PropertyReplacer(Map aProperties) |
| Modifier and Type | Method and Description |
|---|---|
Map |
getProperties() |
String |
replaceProperties(String value)
Source based on ant's tools.ant.ProjectHelper.java
Replace ${} style constructions in the given value with the string value of
the corresponding data types.
|
String |
replaceProperties(String value,
String chars)
Replace in a simple style with flexible separator chars, e.g.
|
public PropertyReplacer(Map aProperties)
public Map getProperties()
public String replaceProperties(String value, String chars)
value - - string to replace properties inchars - - a two-char string with begin+end char, default (if null) = "{}"public String replaceProperties(String value)
value - the string to be scanned for property references.Copyright © 2008–2018. All rights reserved.