org.jfree.report.util
Class PropertyLookupParser
java.lang.Object
org.jfree.report.util.PropertyLookupParser
- Serializable
extends java.lang.Object
implements Serializable
The property lookup parser is used to resolve embedded references to
properties within strings.
The default format of the property specification is:
${property-name}
where 'property-name is the name of the
property. If this construct is found within the text, it is replaced with
the value returned from a call to "lookupVariable".
PropertyLookupParser
protected PropertyLookupParser()
Initializes the parser to the default format of "${..}". The
escape char will be a backslash.
getClosingBraceChar
public char getClosingBraceChar()
Returns the currently defined closed-brace char.
getEscapeChar
public char getEscapeChar()
Returns the escape char.
getMarkerChar
public char getMarkerChar()
Returns initial property marker char.
- the initial property marker character.
getOpeningBraceChar
public char getOpeningBraceChar()
Returns the currently defined opening-brace char.
lookupVariable
protected abstract String lookupVariable(String property)
Looks up the property with the given name.
property
- the name of the property to look up.
setClosingBraceChar
public void setClosingBraceChar(char closingBraceChar)
Defines the closing brace character.
closingBraceChar
- the closed-brace character.
setEscapeChar
public void setEscapeChar(char escapeChar)
Defines the escape char.
escapeChar
- the escape char
setMarkerChar
public void setMarkerChar(char markerChar)
Defines initial property marker char.
markerChar
- the initial property marker character.
setOpeningBraceChar
public void setOpeningBraceChar(char openingBraceChar)
Defines the opening brace character.
openingBraceChar
- the opening-brace character.
translateAndLookup
public String translateAndLookup(String value)
Translates the given string and resolves the embedded property references.
- the fully translated string.