jodd.props
Class PropsParser

java.lang.Object
  extended by jodd.props.PropsParser
All Implemented Interfaces:
java.lang.Cloneable

public class PropsParser
extends java.lang.Object
implements java.lang.Cloneable

Props parser.


Nested Class Summary
protected static class PropsParser.ParseState
          Parsing states.
 
Field Summary
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 Summary
PropsParser()
           
PropsParser(PropsData propsData)
           
 
Method Summary
protected  void add(java.lang.String key, java.lang.String value)
          Adds key-value to properties and profiles.
protected  void add(java.lang.String section, java.lang.String key, java.lang.StringBuilder value, boolean trim)
          Adds accumulated value to key and current section.
 PropsParser clone()
           
 PropsData getPropsData()
           
 void parse(java.lang.String in)
          Loads properties.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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:
clone in class java.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)
Adds accumulated value to key and current section.


add

protected void add(java.lang.String key,
                   java.lang.String value)
Adds key-value to properties and profiles.



Copyright © 2003-2013 Jodd Team