public class StubParser extends Object
The main entry point is parse(String, InputStream, AnnotatedTypeFactory,
ProcessingEnvironment, Map, Map)
, which side-effects its last two arguments. It operates in two
steps. First, it calls the Stub Parser to parse a stub file. Then, it walks the Stub Parser's AST
to create/collect types and declaration annotations.
Modifier and Type | Method and Description |
---|---|
static void |
parse(String filename,
InputStream inputStream,
AnnotatedTypeFactory atypeFactory,
ProcessingEnvironment processingEnv,
Map<Element,AnnotatedTypeMirror> atypes,
Map<String,Set<AnnotationMirror>> declAnnos)
The main entry point.
|
static void |
parseJdkFileAsStub(String filename,
InputStream inputStream,
AnnotatedTypeFactory atypeFactory,
ProcessingEnvironment processingEnv,
Map<Element,AnnotatedTypeMirror> atypes,
Map<String,Set<AnnotationMirror>> declAnnos)
Parse a stub file that is a part of the annotated JDK and side-effects the last two
arguments.
|
public static void parse(String filename, InputStream inputStream, AnnotatedTypeFactory atypeFactory, ProcessingEnvironment processingEnv, Map<Element,AnnotatedTypeMirror> atypes, Map<String,Set<AnnotationMirror>> declAnnos)
filename
- name of stub file, used only for diagnostic messagesinputStream
- of stub file to parseatypeFactory
- AnnotatedTypeFactory to useprocessingEnv
- ProcessingEnvironment to useatypes
- annotated types from this stub file are added to this mapdeclAnnos
- map from a name (actually declaration element string) to the set of
declaration annotations on it. Declaration annotations from this stub file are added to
this map.public static void parseJdkFileAsStub(String filename, InputStream inputStream, AnnotatedTypeFactory atypeFactory, ProcessingEnvironment processingEnv, Map<Element,AnnotatedTypeMirror> atypes, Map<String,Set<AnnotationMirror>> declAnnos)
filename
- name of stub file, used only for diagnostic messagesinputStream
- of stub file to parseatypeFactory
- AnnotatedTypeFactory to useprocessingEnv
- ProcessingEnvironment to useatypes
- annotated types from this stub file are added to this mapdeclAnnos
- map from a name (actually declaration element string) to the set of
declaration annotations on it. Declaration annotations from this stub file are added to
this map.