Package org.apache.xmlgraphics.ps
Class PSDictionary.Maker
java.lang.Object
org.apache.xmlgraphics.ps.PSDictionary.Maker
- Enclosing class:
PSDictionary
This class is used to parse dictionary strings.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classSimple token holding class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate intindexOfMatchingBrace(String str, String[] braces, int fromIndex) Returns the closing brace index from a given string searches from a given indexprotected PSDictionary.Maker.TokenReturns a Token containing the start, end index and value of the next token found in a given stringparseDictionary(String str) Parses a dictionary string and provides a dictionary objectprivate StringstripBraces(String str, String[] braces) Strips braces from complex object string
-
Field Details
-
BRACES
-
OPENING
private static final int OPENING- See Also:
-
CLOSING
private static final int CLOSING- See Also:
-
DICTIONARY
private static final int DICTIONARY- See Also:
-
ARRAY
private static final int ARRAY- See Also:
-
PROCEDURE
private static final int PROCEDURE- See Also:
-
STRING
private static final int STRING- See Also:
-
-
Constructor Details
-
Maker
private Maker()
-
-
Method Details
-
nextToken
Returns a Token containing the start, end index and value of the next token found in a given string- Parameters:
str- string to searchfromIndex- search from index- Returns:
- Token containing the start, end index and value of the next token
-
indexOfMatchingBrace
private int indexOfMatchingBrace(String str, String[] braces, int fromIndex) throws PSDictionaryFormatException Returns the closing brace index from a given string searches from a given index- Parameters:
str- string to searchbraces- string array of opening and closing bracefromIndex- searches from index- Returns:
- matching brace index
- Throws:
PSDictionaryFormatException- thrown in the event that a parsing error occurred
-
stripBraces
Strips braces from complex object string- Parameters:
str- String to parsebraces- String array containing opening and closing braces- Returns:
- String with braces stripped
- Throws:
PSDictionaryFormatException- thrown in the event that a parsing error occurred
-
parseDictionary
Parses a dictionary string and provides a dictionary object- Parameters:
str- a dictionary string- Returns:
- A postscript dictionary object
- Throws:
PSDictionaryFormatException- thrown in the event that a parsing error occurred
-