Class PropertyListParser
- java.lang.Object
-
- org.apache.commons.configuration2.plist.PropertyListParser
-
- All Implemented Interfaces:
PropertyListParserConstants
class PropertyListParser extends java.lang.Object implements PropertyListParserConstants
JavaCC based parser for the PropertyList format.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
PropertyListParser.JJCalls
private static class
PropertyListParser.LookaheadSuccess
-
Field Summary
Fields Modifier and Type Field Description private PropertyListParser.JJCalls[]
jj_2_rtns
private int
jj_endpos
private java.util.List<int[]>
jj_expentries
private int[]
jj_expentry
private int
jj_gc
private int
jj_gen
(package private) SimpleCharStream
jj_input_stream
private int
jj_kind
private int
jj_la
private int[]
jj_la1
private static int[]
jj_la1_0
private Token
jj_lastpos
private int[]
jj_lasttokens
private static PropertyListParser.LookaheadSuccess
jj_ls
Token
jj_nt
Next token.private int
jj_ntk
private boolean
jj_rescan
private Token
jj_scanpos
Token
token
Current token.PropertyListParserTokenManager
token_source
Generated Token Manager.private boolean
trace_enabled
-
Fields inherited from interface org.apache.commons.configuration2.plist.PropertyListParserConstants
ARRAY_BEGIN, ARRAY_END, ARRAY_SEPARATOR, DATA, DATA_END, DATA_START, DATE, DATE_START, DEFAULT, DICT_BEGIN, DICT_END, DICT_SEPARATOR, EOF, EQUAL, ESCAPED_QUOTE, HEXA, IN_COMMENT, IN_SINGLE_LINE_COMMENT, LETTER, QUOTE, QUOTED_STRING, SINGLE_LINE_COMMENT, STRING, tokenImage, WHITE
-
-
Constructor Summary
Constructors Constructor Description PropertyListParser(java.io.InputStream stream)
Constructor with InputStream.PropertyListParser(java.io.InputStream stream, java.lang.String encoding)
Constructor with InputStream and supplied encodingPropertyListParser(java.io.Reader stream)
Constructor.PropertyListParser(PropertyListParserTokenManager tm)
Constructor with generated Token Manager.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List
Array()
byte[]
Data()
java.util.Date
Date()
PropertyListConfiguration
Dictionary()
void
disable_tracing()
Disable tracing.java.lang.Object
Element()
void
enable_tracing()
Enable tracing.protected byte[]
filterData(java.lang.String s)
Remove the white spaces and the data delimiters from the specified string and parse it as a byte array.ParseException
generateParseException()
Generate ParseException.Token
getNextToken()
Get the next Token.Token
getToken(int index)
Get the specific Token.private boolean
jj_2_1(int xla)
private boolean
jj_3_1()
private boolean
jj_3R_Array_244_5_3()
private boolean
jj_3R_Array_246_9_4()
private boolean
jj_3R_Data_276_5_12()
private boolean
jj_3R_Date_285_5_13()
private boolean
jj_3R_Dictionary_171_5_10()
private boolean
jj_3R_Element_220_5_5()
private boolean
jj_3R_Element_225_5_6()
private boolean
jj_3R_Element_228_5_7()
private boolean
jj_3R_Element_231_5_8()
private boolean
jj_3R_Element_234_5_9()
private boolean
jj_3R_String_264_5_11()
private boolean
jj_3R_String_264_5_14()
private boolean
jj_3R_String_267_5_15()
private void
jj_add_error_token(int kind, int pos)
private Token
jj_consume_token(int kind)
private static void
jj_la1_init_0()
private int
jj_ntk_f()
private void
jj_rescan_token()
private void
jj_save(int index, int xla)
private boolean
jj_scan_token(int kind)
PropertyListConfiguration
parse()
protected java.util.Date
parseDate(java.lang.String s)
Parse a date formatted as <*D2002-03-22 11:30:00 +0100>ImmutableNode
Property()
void
ReInit(java.io.InputStream stream)
Reinitialise.void
ReInit(java.io.InputStream stream, java.lang.String encoding)
Reinitialise.void
ReInit(java.io.Reader stream)
Reinitialise.void
ReInit(PropertyListParserTokenManager tm)
Reinitialise.protected java.lang.String
removeQuotes(java.lang.String s)
Remove the quotes at the beginning and at the end of the specified String.java.lang.String
String()
boolean
trace_enabled()
Trace enabled.protected java.lang.String
unescapeQuotes(java.lang.String s)
-
-
-
Field Detail
-
token_source
public PropertyListParserTokenManager token_source
Generated Token Manager.
-
jj_input_stream
SimpleCharStream jj_input_stream
-
token
public Token token
Current token.
-
jj_nt
public Token jj_nt
Next token.
-
jj_ntk
private int jj_ntk
-
jj_scanpos
private Token jj_scanpos
-
jj_lastpos
private Token jj_lastpos
-
jj_la
private int jj_la
-
jj_gen
private int jj_gen
-
jj_la1
private final int[] jj_la1
-
jj_la1_0
private static int[] jj_la1_0
-
jj_2_rtns
private final PropertyListParser.JJCalls[] jj_2_rtns
-
jj_rescan
private boolean jj_rescan
-
jj_gc
private int jj_gc
-
jj_ls
private static final PropertyListParser.LookaheadSuccess jj_ls
-
jj_expentries
private java.util.List<int[]> jj_expentries
-
jj_expentry
private int[] jj_expentry
-
jj_kind
private int jj_kind
-
jj_lasttokens
private int[] jj_lasttokens
-
jj_endpos
private int jj_endpos
-
trace_enabled
private boolean trace_enabled
-
-
Constructor Detail
-
PropertyListParser
public PropertyListParser(java.io.InputStream stream)
Constructor with InputStream.
-
PropertyListParser
public PropertyListParser(java.io.InputStream stream, java.lang.String encoding)
Constructor with InputStream and supplied encoding
-
PropertyListParser
public PropertyListParser(java.io.Reader stream)
Constructor.
-
PropertyListParser
public PropertyListParser(PropertyListParserTokenManager tm)
Constructor with generated Token Manager.
-
-
Method Detail
-
removeQuotes
protected java.lang.String removeQuotes(java.lang.String s)
Remove the quotes at the beginning and at the end of the specified String.
-
unescapeQuotes
protected java.lang.String unescapeQuotes(java.lang.String s)
-
filterData
protected byte[] filterData(java.lang.String s) throws ParseException
Remove the white spaces and the data delimiters from the specified string and parse it as a byte array.- Throws:
ParseException
-
parseDate
protected java.util.Date parseDate(java.lang.String s) throws ParseException
Parse a date formatted as <*D2002-03-22 11:30:00 +0100>- Throws:
ParseException
-
parse
public final PropertyListConfiguration parse() throws ParseException
- Throws:
ParseException
-
Dictionary
public final PropertyListConfiguration Dictionary() throws ParseException
- Throws:
ParseException
-
Property
public final ImmutableNode Property() throws ParseException
- Throws:
ParseException
-
Element
public final java.lang.Object Element() throws ParseException
- Throws:
ParseException
-
Array
public final java.util.List Array() throws ParseException
- Throws:
ParseException
-
String
public final java.lang.String String() throws ParseException
- Throws:
ParseException
-
Data
public final byte[] Data() throws ParseException
- Throws:
ParseException
-
Date
public final java.util.Date Date() throws ParseException
- Throws:
ParseException
-
jj_2_1
private boolean jj_2_1(int xla)
-
jj_3R_String_267_5_15
private boolean jj_3R_String_267_5_15()
-
jj_3R_Array_244_5_3
private boolean jj_3R_Array_244_5_3()
-
jj_3_1
private boolean jj_3_1()
-
jj_3R_Element_220_5_5
private boolean jj_3R_Element_220_5_5()
-
jj_3R_String_264_5_14
private boolean jj_3R_String_264_5_14()
-
jj_3R_String_264_5_11
private boolean jj_3R_String_264_5_11()
-
jj_3R_Dictionary_171_5_10
private boolean jj_3R_Dictionary_171_5_10()
-
jj_3R_Date_285_5_13
private boolean jj_3R_Date_285_5_13()
-
jj_3R_Element_234_5_9
private boolean jj_3R_Element_234_5_9()
-
jj_3R_Element_231_5_8
private boolean jj_3R_Element_231_5_8()
-
jj_3R_Data_276_5_12
private boolean jj_3R_Data_276_5_12()
-
jj_3R_Element_228_5_7
private boolean jj_3R_Element_228_5_7()
-
jj_3R_Array_246_9_4
private boolean jj_3R_Array_246_9_4()
-
jj_3R_Element_225_5_6
private boolean jj_3R_Element_225_5_6()
-
jj_la1_init_0
private static void jj_la1_init_0()
-
ReInit
public void ReInit(java.io.InputStream stream)
Reinitialise.
-
ReInit
public void ReInit(java.io.InputStream stream, java.lang.String encoding)
Reinitialise.
-
ReInit
public void ReInit(java.io.Reader stream)
Reinitialise.
-
ReInit
public void ReInit(PropertyListParserTokenManager tm)
Reinitialise.
-
jj_consume_token
private Token jj_consume_token(int kind) throws ParseException
- Throws:
ParseException
-
jj_scan_token
private boolean jj_scan_token(int kind)
-
getNextToken
public final Token getNextToken()
Get the next Token.
-
getToken
public final Token getToken(int index)
Get the specific Token.
-
jj_ntk_f
private int jj_ntk_f()
-
jj_add_error_token
private void jj_add_error_token(int kind, int pos)
-
generateParseException
public ParseException generateParseException()
Generate ParseException.
-
trace_enabled
public final boolean trace_enabled()
Trace enabled.
-
enable_tracing
public final void enable_tracing()
Enable tracing.
-
disable_tracing
public final void disable_tracing()
Disable tracing.
-
jj_rescan_token
private void jj_rescan_token()
-
jj_save
private void jj_save(int index, int xla)
-
-