public class AnnotationFileParser extends Object
AnnotationFileParser.AnnotationFileAnnotations
passed as an argument.
The main entry point is parseStubFile(String, InputStream,
AnnotatedTypeFactory, ProcessingEnvironment, AnnotationFileAnnotations)
, which side-effects its
last argument. It operates in two steps. First, it calls the Annotation File Parser to parse an
annotation file. Then, it walks the AST to create/collect types and declaration annotations.
Modifier and Type | Class and Description |
---|---|
static class |
AnnotationFileParser.AnnotationFileAnnotations
The result of calling AnnotationFileParser.parse: the annotated types and declaration
annotations from the file.
|
static class |
AnnotationFileParser.AnnotationFileParserException
An exception indicating a problem while parsing an annotation file.
|
Modifier and Type | Method and Description |
---|---|
static void |
parseJdkFileAsStub(String filename,
InputStream inputStream,
AnnotatedTypeFactory atypeFactory,
ProcessingEnvironment processingEnv,
AnnotationFileParser.AnnotationFileAnnotations stubAnnos)
Parse a stub file that is a part of the annotated JDK and side-effects the last two
arguments.
|
static void |
parseStubFile(String filename,
InputStream inputStream,
AnnotatedTypeFactory atypeFactory,
ProcessingEnvironment processingEnv,
AnnotationFileParser.AnnotationFileAnnotations annotationFileAnnos)
The main entry point.
|
public static void parseStubFile(String filename, InputStream inputStream, AnnotatedTypeFactory atypeFactory, ProcessingEnvironment processingEnv, AnnotationFileParser.AnnotationFileAnnotations annotationFileAnnos)
filename
- name of stub file, used only for diagnostic messagesinputStream
- of stub file to parseatypeFactory
- AnnotatedTypeFactory to useprocessingEnv
- ProcessingEnvironment to useannotationFileAnnos
- annotations from the annotation file; side-effected by this methodpublic static void parseJdkFileAsStub(String filename, InputStream inputStream, AnnotatedTypeFactory atypeFactory, ProcessingEnvironment processingEnv, AnnotationFileParser.AnnotationFileAnnotations stubAnnos)
filename
- name of stub file, used only for diagnostic messagesinputStream
- of stub file to parseatypeFactory
- AnnotatedTypeFactory to useprocessingEnv
- ProcessingEnvironment to usestubAnnos
- annotations from the stub file; side-effected by this method