public class PropsParser
extends java.lang.Object
implements java.lang.Cloneable
Props
parser.Modifier and Type | Class and Description |
---|---|
protected static class |
PropsParser.Operator
Different assignment operators.
|
protected static class |
PropsParser.ParseState
Parsing states.
|
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
escapeNewLineValue
Value that will be inserted when escaping the new line.
|
protected boolean |
ignorePrefixWhitespacesOnNewLine
Defines if starting whitespaces when value is split in the new line
should be ignored or not.
|
protected boolean |
multilineValues
Defines if multi-line values may be written using triple-quotes
as in python.
|
protected static java.lang.String |
PROFILE_LEFT |
protected static java.lang.String |
PROFILE_RIGHT |
protected PropsData |
propsData |
protected boolean |
skipEmptyProps
Don't include empty properties.
|
protected boolean |
valueTrimLeft
Trims left the value.
|
protected boolean |
valueTrimRight
Trims right the value.
|
Constructor and Description |
---|
PropsParser() |
PropsParser(PropsData propsData) |
Modifier and Type | Method and Description |
---|---|
protected void |
add(java.lang.String section,
java.lang.String key,
java.lang.StringBuilder value,
boolean trim,
PropsParser.Operator operator)
Adds accumulated value to key and current section.
|
PropsParser |
clone() |
protected void |
extractProfilesAndAdd(java.lang.String key,
java.lang.String value,
PropsParser.Operator operator)
Extracts profiles from the key name and adds key-value to them.
|
PropsData |
getPropsData() |
protected void |
justAdd(java.lang.String key,
java.lang.String value,
java.util.ArrayList<java.lang.String> keyProfiles,
PropsParser.Operator operator)
Core key-value addition.
|
void |
parse(java.lang.String in)
Loads properties.
|
protected static final java.lang.String PROFILE_LEFT
protected static final java.lang.String PROFILE_RIGHT
protected final PropsData propsData
protected java.lang.String escapeNewLineValue
protected boolean valueTrimLeft
protected boolean valueTrimRight
protected boolean ignorePrefixWhitespacesOnNewLine
protected boolean multilineValues
protected boolean skipEmptyProps
public PropsParser()
public PropsParser(PropsData propsData)
public PropsData getPropsData()
public PropsParser clone()
clone
in class java.lang.Object
public void parse(java.lang.String in)
protected void add(java.lang.String section, java.lang.String key, java.lang.StringBuilder value, boolean trim, PropsParser.Operator operator)
protected void extractProfilesAndAdd(java.lang.String key, java.lang.String value, PropsParser.Operator operator)
protected void justAdd(java.lang.String key, java.lang.String value, java.util.ArrayList<java.lang.String> keyProfiles, PropsParser.Operator operator)
Copyright © 2003-present Jodd Team