public class StubParser
extends java.lang.Object
parse(String, InputStream, AnnotatedTypeFactory,
ProcessingEnvironment, Map, Map)
, which side-effects its last two arguments.
The constructor acts in two parts. First, it calls the Stub Parser to parse a stub file. Then, itis walks the Stub Parser's AST to create/collect types and declaration annotations.
Constructor and Description |
---|
StubParser(java.lang.String filename,
AnnotatedTypeFactory atypeFactory,
javax.annotation.processing.ProcessingEnvironment processingEnv,
java.util.Map<javax.lang.model.element.Element,AnnotatedTypeMirror> atypes,
java.util.Map<java.lang.String,java.util.Set<javax.lang.model.element.AnnotationMirror>> declAnnos,
boolean isJdkAsStub)
Create a new StubParser object, which will parse and extract annotations from the given stub
file.
|
Modifier and Type | Method and Description |
---|---|
static void |
parse(java.lang.String filename,
java.io.InputStream inputStream,
AnnotatedTypeFactory atypeFactory,
javax.annotation.processing.ProcessingEnvironment processingEnv,
java.util.Map<javax.lang.model.element.Element,AnnotatedTypeMirror> atypes,
java.util.Map<java.lang.String,java.util.Set<javax.lang.model.element.AnnotationMirror>> declAnnos)
The main entry point.
|
static void |
parseJdkFileAsStub(java.lang.String filename,
java.io.InputStream inputStream,
AnnotatedTypeFactory atypeFactory,
javax.annotation.processing.ProcessingEnvironment processingEnv,
java.util.Map<javax.lang.model.element.Element,AnnotatedTypeMirror> atypes,
java.util.Map<java.lang.String,java.util.Set<javax.lang.model.element.AnnotationMirror>> declAnnos)
Parse a stub file that is a part of the annotated jdk and side-effects the last two
arguments.
|
public StubParser(java.lang.String filename, AnnotatedTypeFactory atypeFactory, javax.annotation.processing.ProcessingEnvironment processingEnv, java.util.Map<javax.lang.model.element.Element,AnnotatedTypeMirror> atypes, java.util.Map<java.lang.String,java.util.Set<javax.lang.model.element.AnnotationMirror>> declAnnos, boolean isJdkAsStub)
filename
- name of stub file, used only for diagnostic messagesatypeFactory
- AnnotatedtypeFactory to useprocessingEnv
- ProcessingEnviroment to useisJdkAsStub
- whether or not the stub file is a part of the jdk.public static void parse(java.lang.String filename, java.io.InputStream inputStream, AnnotatedTypeFactory atypeFactory, javax.annotation.processing.ProcessingEnvironment processingEnv, java.util.Map<javax.lang.model.element.Element,AnnotatedTypeMirror> atypes, java.util.Map<java.lang.String,java.util.Set<javax.lang.model.element.AnnotationMirror>> declAnnos)
filename
- name of stub file, used only for diagnostic messagesinputStream
- of stub file to parseatypeFactory
- AnnotatedtypeFactory to useprocessingEnv
- ProcessingEnviroment to useatypes
- annotated types from this stub file is added to this mapdeclAnnos
- declaration annotations from this stub file are added to this mappublic static void parseJdkFileAsStub(java.lang.String filename, java.io.InputStream inputStream, AnnotatedTypeFactory atypeFactory, javax.annotation.processing.ProcessingEnvironment processingEnv, java.util.Map<javax.lang.model.element.Element,AnnotatedTypeMirror> atypes, java.util.Map<java.lang.String,java.util.Set<javax.lang.model.element.AnnotationMirror>> declAnnos)
filename
- name of stub file, used only for diagnostic messagesinputStream
- of stub file to parseatypeFactory
- AnnotatedtypeFactory to useprocessingEnv
- ProcessingEnviroment to useatypes
- annotated types from this stub file is added to this mapdeclAnnos
- declaration annotations from this stub file are added to this map