Package jodd.props
Class PropsParser
- java.lang.Object
-
- jodd.props.PropsParser
-
- All Implemented Interfaces:
java.lang.Cloneable
public class PropsParser extends java.lang.Object implements java.lang.CloneablePropsparser.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classPropsParser.OperatorDifferent assignment operators.protected static classPropsParser.ParseStateParsing states.
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringescapeNewLineValueValue that will be inserted when escaping the new line.protected booleanignorePrefixWhitespacesOnNewLineDefines if starting whitespaces when value is split in the new line should be ignored or not.protected booleanmultilineValuesDefines if multi-line values may be written using triple-quotes as in python.protected static java.lang.StringPROFILE_LEFTprotected static java.lang.StringPROFILE_RIGHTprotected PropsDatapropsDataprotected booleanskipEmptyPropsDon't include empty properties.protected booleanvalueTrimLeftTrims left the value.protected booleanvalueTrimRightTrims right the value.
-
Constructor Summary
Constructors Constructor Description PropsParser()PropsParser(PropsData propsData)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidadd(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.PropsParserclone()protected voidextractProfilesAndAdd(java.lang.String key, java.lang.String value, PropsParser.Operator operator)Extracts profiles from the key name and adds key-value to them.PropsDatagetPropsData()protected voidjustAdd(java.lang.String key, java.lang.String value, java.util.ArrayList<java.lang.String> keyProfiles, PropsParser.Operator operator)Core key-value addition.voidparse(java.lang.String in)Loads properties.
-
-
-
Field Detail
-
PROFILE_LEFT
protected static final java.lang.String PROFILE_LEFT
- See Also:
- Constant Field Values
-
PROFILE_RIGHT
protected static final java.lang.String PROFILE_RIGHT
- See Also:
- Constant Field Values
-
propsData
protected final PropsData propsData
-
escapeNewLineValue
protected java.lang.String escapeNewLineValue
Value that will be inserted when escaping the new line.
-
valueTrimLeft
protected boolean valueTrimLeft
Trims left the value.
-
valueTrimRight
protected boolean valueTrimRight
Trims right the value.
-
ignorePrefixWhitespacesOnNewLine
protected boolean ignorePrefixWhitespacesOnNewLine
Defines if starting whitespaces when value is split in the new line should be ignored or not.
-
multilineValues
protected boolean multilineValues
Defines if multi-line values may be written using triple-quotes as in python.
-
skipEmptyProps
protected boolean skipEmptyProps
Don't include empty properties.
-
-
Constructor Detail
-
PropsParser
public PropsParser()
-
PropsParser
public PropsParser(PropsData propsData)
-
-
Method Detail
-
getPropsData
public PropsData getPropsData()
-
clone
public PropsParser clone()
- Overrides:
clonein classjava.lang.Object
-
parse
public void parse(java.lang.String in)
Loads properties.
-
add
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.
-
extractProfilesAndAdd
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.
-
justAdd
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.
-
-