Package org.apache.ivy.osgi.core
Class ManifestHeaderValue.ManifestHeaderParser
- java.lang.Object
-
- org.apache.ivy.osgi.core.ManifestHeaderValue.ManifestHeaderParser
-
- Enclosing class:
- ManifestHeaderValue
class ManifestHeaderValue.ManifestHeaderParser extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringBuilder
buffer
bufferprivate char
c
last read characterprivate ManifestHeaderElement
elem
the header element being buildprivate java.lang.String
header
header to parseprivate boolean
isDirective
true if the last parsed parameter is a directive (assigned via :=)private int
length
the length of the sourceprivate java.lang.String
paramName
the last parsed parameter nameprivate int
pos
position in the sourceprivate boolean
valuesParsed
Once at true (at the first attribute parsed), only parameters are allowed
-
Constructor Summary
Constructors Constructor Description ManifestHeaderParser(java.lang.String header)
Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
appendEscaped()
private void
appendQuoted(boolean doubleQuoted)
private void
endParameterName()
private void
endParameterValue()
private void
endValue()
private void
error(java.lang.String message)
private void
error(java.lang.String message, int p)
(package private) void
parse()
Do the parsingprivate void
parseElement()
private void
parseParameterValue()
private void
parseSeparator()
private void
parseValueOrParameter()
private char
readNext()
-
-
-
Field Detail
-
header
private final java.lang.String header
header to parse
-
length
private int length
the length of the source
-
buffer
private java.lang.StringBuilder buffer
buffer
-
pos
private int pos
position in the source
-
c
private char c
last read character
-
elem
private ManifestHeaderElement elem
the header element being build
-
valuesParsed
private boolean valuesParsed
Once at true (at the first attribute parsed), only parameters are allowed
-
paramName
private java.lang.String paramName
the last parsed parameter name
-
isDirective
private boolean isDirective
true if the last parsed parameter is a directive (assigned via :=)
-
-
Method Detail
-
parse
void parse() throws java.text.ParseException
Do the parsing- Throws:
java.text.ParseException
- if something goes wrong
-
readNext
private char readNext()
-
error
private void error(java.lang.String message) throws java.text.ParseException
- Throws:
java.text.ParseException
-
error
private void error(java.lang.String message, int p) throws java.text.ParseException
- Throws:
java.text.ParseException
-
parseElement
private void parseElement() throws java.text.ParseException
- Throws:
java.text.ParseException
-
parseValueOrParameter
private void parseValueOrParameter() throws java.text.ParseException
- Throws:
java.text.ParseException
-
endValue
private void endValue() throws java.text.ParseException
- Throws:
java.text.ParseException
-
endParameterName
private void endParameterName() throws java.text.ParseException
- Throws:
java.text.ParseException
-
parseSeparator
private void parseSeparator() throws java.text.ParseException
- Throws:
java.text.ParseException
-
parseParameterValue
private void parseParameterValue() throws java.text.ParseException
- Throws:
java.text.ParseException
-
endParameterValue
private void endParameterValue() throws java.text.ParseException
- Throws:
java.text.ParseException
-
appendQuoted
private void appendQuoted(boolean doubleQuoted)
-
appendEscaped
private void appendEscaped()
-
-