asia.redact.bracket.properties
Class PropertiesParser
java.lang.Object
asia.redact.bracket.properties.PropertiesParser
public class PropertiesParser
- extends Object
Populate a Properties object. Parser is a thread-safe one use object. The list of
tokens normally is the output of a PropertiesLexer but can be generated in other ways,
for example manually.
- Author:
- Dave
- See Also:
PropertiesLexer
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tokens
final Stack<PropertiesToken> tokens
properties
final Properties properties
lock
private final Lock lock
trimValues
private boolean trimValues
PropertiesParser
public PropertiesParser(List<PropertiesToken> tokens,
Properties properties)
PropertiesParser
public PropertiesParser(List<PropertiesToken> tokens)
- This constructor expects the tokens to be in parse order, it reverses the order as it pushes them onto the stack
(so the stack order is backwards to the parse).
- Parameters:
tokens -
PropertiesParser
public PropertiesParser(Stack<PropertiesToken> tokens)
- This constructor expects the tokens to be in reverse parse order, it uses the stack as-is
(the stack order is backwards to the parse order).
- Parameters:
tokens -
parse
public void parse()
peek
private PropertiesToken peek()
pop
private PropertiesToken pop()
getProperties
public Properties getProperties()
isTrimValues
public boolean isTrimValues()
setTrimValues
public void setTrimValues(boolean trimValues)
trimEndingWhiteSpace
private String trimEndingWhiteSpace(String text)
Copyright © 2011-2013 David R. Smith. All Rights Reserved.