|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbiz.hammurapi.config.PropertyParser
public class PropertyParser
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.
Field Summary | |
---|---|
static java.lang.String |
TOKEN_CLOSING_CHAR
|
static java.lang.String |
TOKEN_FIRST_OPENING_CHAR
|
static java.lang.String |
TOKEN_SECOND_OPENING_CHAR
|
Constructor Summary | |
---|---|
PropertyParser(boolean useNameAsDefault)
Creates a new instance of PropertyParser with system properties. |
|
PropertyParser(boolean useNameAsDefault,
char tokenFirstOpeningChar,
char tokenSecondOpeningChar,
char tokenClosingChar)
Creates a new instance of PropertyParser with system properties. |
|
PropertyParser(Context context,
boolean useNameAsDefault)
Creates a new instance of PropertyParser |
|
PropertyParser(Context context,
boolean useNameAsDefault,
char tokenFirstOpeningChar,
char tokenSecondOpeningChar,
char tokenClosingChar)
Creates a new instance of PropertyParser |
Method Summary | |
---|---|
java.lang.String |
getParsedProperty(java.lang.String key)
Property parsing. |
java.lang.String |
parse(java.lang.String str)
Parses a string by replacing occurences of ${<property name>} with property values. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String TOKEN_CLOSING_CHAR
public static final java.lang.String TOKEN_SECOND_OPENING_CHAR
public static final java.lang.String TOKEN_FIRST_OPENING_CHAR
Constructor Detail |
---|
public PropertyParser(boolean useNameAsDefault)
useNameAsDefault
- If true then property name will be used
as property default value.public PropertyParser(Context context, boolean useNameAsDefault)
properties
- PropertiesuseNameAsDefault
- If true then property name will be used
as property default value.public PropertyParser(boolean useNameAsDefault, char tokenFirstOpeningChar, char tokenSecondOpeningChar, char tokenClosingChar)
useNameAsDefault
- If true then property name will be used
as property default value.public PropertyParser(Context context, boolean useNameAsDefault, char tokenFirstOpeningChar, char tokenSecondOpeningChar, char tokenClosingChar)
properties
- PropertiesuseNameAsDefault
- If true then property name will be used
as property default value.Method Detail |
---|
public java.lang.String getParsedProperty(java.lang.String key)
public java.lang.String parse(java.lang.String str)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |