private static class PSDictionary.Maker
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private static class |
PSDictionary.Maker.Token
Simple token holding class
|
Modifier and Type | Field and Description |
---|---|
private static int |
ARRAY |
private static java.lang.String[][] |
BRACES |
private static int |
CLOSING |
private static int |
DICTIONARY |
private static int |
OPENING |
private static int |
PROCEDURE |
private static int |
STRING |
Modifier | Constructor and Description |
---|---|
private |
Maker() |
Modifier and Type | Method and Description |
---|---|
private int |
indexOfMatchingBrace(java.lang.String str,
java.lang.String[] braces,
int fromIndex)
Returns the closing brace index from a given string searches from a
given index
|
protected PSDictionary.Maker.Token |
nextToken(java.lang.String str,
int fromIndex)
Returns a Token containing the start, end index and value of the next token
found in a given string
|
PSDictionary |
parseDictionary(java.lang.String str)
Parses a dictionary string and provides a dictionary object
|
private java.lang.String |
stripBraces(java.lang.String str,
java.lang.String[] braces)
Strips braces from complex object string
|
private static final java.lang.String[][] BRACES
private static final int OPENING
private static final int CLOSING
private static final int DICTIONARY
private static final int ARRAY
private static final int PROCEDURE
private static final int STRING
protected PSDictionary.Maker.Token nextToken(java.lang.String str, int fromIndex)
str
- string to searchfromIndex
- search from indexprivate int indexOfMatchingBrace(java.lang.String str, java.lang.String[] braces, int fromIndex) throws PSDictionaryFormatException
str
- string to searchbraces
- string array of opening and closing bracefromIndex
- searches from indexPSDictionaryFormatException
- thrown in the event that a parsing error occurredprivate java.lang.String stripBraces(java.lang.String str, java.lang.String[] braces) throws PSDictionaryFormatException
str
- String to parsebraces
- String array containing opening and closing bracesPSDictionaryFormatException
- thrown in the event that a parsing error occurredpublic PSDictionary parseDictionary(java.lang.String str) throws PSDictionaryFormatException
str
- a dictionary stringPSDictionaryFormatException
- thrown in the event that a parsing error occurred