Package aQute.lib.utf8properties
Class PropertiesParser
- java.lang.Object
-
- aQute.lib.utf8properties.PropertiesParser
-
final class PropertiesParser extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private booleancontinuationprivate charcurrentprivate java.lang.Stringfileprivate static byte[]INFOprivate static byteKEYprivate intlengthprivate intlineprivate static byteLINEprivate intmarkerprivate static charMAX_DELIMETERprivate static charMIN_DELIMETERprivate intnprivate static byteNOKEYprivate intposprivate java.util.Propertiespropertiesprivate Reporterreporterprivate char[]sourceprivate java.lang.String[]syntaxHeadersprivate booleanvalidKeyprivate static byteWS
-
Constructor Summary
Constructors Constructor Description PropertiesParser(java.lang.String source, java.lang.String file, Reporter reporter, java.util.Properties properties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private charbackslash()private java.lang.Stringcontext()private intcountBackslashesAtEnd(java.lang.StringBuilder sb)private voiderror(java.lang.String msg, java.lang.Object... args)(package private) booleanhasNext()private voidinvalidWhitespace(int quote, java.lang.String type)booleanisEmptyOrComment(char c)private booleanisEven(int count)private booleanisIn(byte delimeters)private booleanisQuote(char tmp)private booleanisSyntaxHeader(java.lang.String key)private java.lang.Stringkey()(package private) charnext()(package private) voidparse()(package private) charpeek()voidsetSyntaxHeaders(java.lang.String[] syntaxHeaders)(package private) voidskip(byte delimeters)voidskipLine()private voidskipWhitespace()private java.lang.Stringtoken(byte delimeters, boolean check)
-
-
-
Field Detail
-
source
private final char[] source
-
length
private final int length
-
reporter
private final Reporter reporter
-
file
private final java.lang.String file
-
MIN_DELIMETER
private static final char MIN_DELIMETER
- See Also:
- Constant Field Values
-
MAX_DELIMETER
private static final char MAX_DELIMETER
- See Also:
- Constant Field Values
-
INFO
private static final byte[] INFO
-
WS
private static final byte WS
- See Also:
- Constant Field Values
-
KEY
private static final byte KEY
- See Also:
- Constant Field Values
-
LINE
private static final byte LINE
- See Also:
- Constant Field Values
-
NOKEY
private static final byte NOKEY
- See Also:
- Constant Field Values
-
n
private int n
-
line
private int line
-
pos
private int pos
-
marker
private int marker
-
current
private char current
-
properties
private java.util.Properties properties
-
validKey
private boolean validKey
-
continuation
private boolean continuation
-
syntaxHeaders
private java.lang.String[] syntaxHeaders
-
-
Constructor Detail
-
PropertiesParser
PropertiesParser(java.lang.String source, java.lang.String file, Reporter reporter, java.util.Properties properties)
-
-
Method Detail
-
hasNext
boolean hasNext()
-
next
char next()
-
skip
void skip(byte delimeters)
-
peek
char peek()
-
parse
void parse()
-
isSyntaxHeader
private boolean isSyntaxHeader(java.lang.String key)
-
skipWhitespace
private void skipWhitespace()
-
isEmptyOrComment
public boolean isEmptyOrComment(char c)
-
skipLine
public void skipLine()
-
token
private java.lang.String token(byte delimeters, boolean check)
-
isQuote
private boolean isQuote(char tmp)
-
isEven
private boolean isEven(int count)
-
countBackslashesAtEnd
private int countBackslashesAtEnd(java.lang.StringBuilder sb)
-
invalidWhitespace
private void invalidWhitespace(int quote, java.lang.String type)
-
key
private java.lang.String key()
-
isIn
private boolean isIn(byte delimeters)
-
backslash
private char backslash()
-
error
private void error(java.lang.String msg, java.lang.Object... args)
-
context
private java.lang.String context()
-
setSyntaxHeaders
public void setSyntaxHeaders(java.lang.String[] syntaxHeaders)
-
-