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