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 StringBuilderbufferprivate charlast read characterprivate ManifestHeaderElementthe header element being buildprivate final Stringheader to parseprivate booleantrue if the last parsed parameter is a directive (assigned via :=)private intthe length of the sourceprivate Stringthe last parsed parameter nameprivate intposition in the sourceprivate booleanOnce at true (at the first attribute parsed), only parameters are allowed -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidprivate voidappendQuoted(boolean doubleQuoted) private voidprivate voidprivate voidendValue()private voidprivate void(package private) voidparse()Do the parsingprivate voidprivate voidprivate voidprivate voidprivate charreadNext()
-
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()
-