Class AnnotationParser
- java.lang.Object
-
- org.infinispan.protostream.impl.parser.AnnotationParser
-
public final class AnnotationParser extends Object
Parses all annotations it encounters and fails on first syntactic error. Everything that looks like a syntactically correct annotation will be parsed and returned. At this stage there is no validation of what annotation name is acceptable or not and no validation of attribute value types, multiplicity, etc. These steps are not part of the syntactic analysis and will be performed later.- Since:
- 2.0
- Author:
- [email protected]
-
-
Constructor Summary
Constructors Constructor Description AnnotationParser(String input, boolean expectDocNoise)
Creates a parser for a given input text.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<AnnotationElement.Annotation>
parse()
Parse the text and extract the annotations.
-
-
-
Constructor Detail
-
AnnotationParser
public AnnotationParser(String input, boolean expectDocNoise)
Creates a parser for a given input text.- Parameters:
input
- the input text to parseexpectDocNoise
- indicates if human readable text is expected to be encountered before the annotations
-
-
Method Detail
-
parse
public List<AnnotationElement.Annotation> parse() throws AnnotationParserException
Parse the text and extract the annotations.- Returns:
- the list of annotations; name uniqueness is not mandatory at this stage
- Throws:
AnnotationParserException
- if syntax errors are encountered
-
-