| |
|
| java.lang.Object biz.hammurapi.config.PropertyParser
PropertyParser | public class PropertyParser (Code) | | Expands property value entries like ${myProperty} to property values.
Nested properties are supportd, i.e. if myProperty value contains ${someOtherPropery}
then it will also be expanded. ${ escaping is not supported.
author: Pavel Vlasov version: $Revision: 1.3 $ |
Constructor Summary | |
public | PropertyParser(boolean useNameAsDefault) Creates a new instance of PropertyParser with system
properties.
Parameters: useNameAsDefault - If true then property name will be usedas property default value. | public | PropertyParser(Context context, boolean useNameAsDefault) Creates a new instance of PropertyParser
Parameters: properties - Properties Parameters: useNameAsDefault - If true then property name will be usedas property default value. |
Method Summary | |
public String | getParsedProperty(String key) Property parsing. | public String | parse(String str) Parses a string by replacing occurences of ${<property name>}
with property values.
If property value contains ${<other property name>} it
will be parsed. |
PropertyParser | public PropertyParser(boolean useNameAsDefault)(Code) | | Creates a new instance of PropertyParser with system
properties.
Parameters: useNameAsDefault - If true then property name will be usedas property default value. |
PropertyParser | public PropertyParser(Context context, boolean useNameAsDefault)(Code) | | Creates a new instance of PropertyParser
Parameters: properties - Properties Parameters: useNameAsDefault - If true then property name will be usedas property default value. |
getParsedProperty | public String getParsedProperty(String key)(Code) | | Property parsing.
Replaces string ${<property name>} with property value.
If property value contains ${<other property name>} it
will be parsed.
|
parse | public String parse(String str)(Code) | | Parses a string by replacing occurences of ${<property name>}
with property values.
If property value contains ${<other property name>} it
will be parsed.
|
|
|
|