Class ExternalAnnotationProvider
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.compiler.classfmt.ExternalAnnotationProvider
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceclassWalker that may serve the annotations on type parameters of the current class or method. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic Stringstatic Stringstatic Stringstatic charRepresents absence of a null annotation.static charRepresentation of a 'nonnull' annotation, independent of the concrete annotation name used in Java sources.static charRepresentation of a 'nullable' annotation, independent of the concrete annotation name used in Java sources.static String -
Constructor Summary
ConstructorsConstructorDescriptionExternalAnnotationProvider(InputStream input, String typeName)Create and initialize. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidassertClassHeader(String line, String typeName)Assert that the given line is a class header for 'typeName' (slash-separated qualified name).static StringextractSignature(String line)Extract the signature from a line of an external annotation file.forField(char[] selector, char[] signature, LookupEnvironment environment)forMethod(char[] selector, char[] signature, LookupEnvironment environment)forTypeHeader(LookupEnvironment environment)toString()protected static StringLines may contain arbitrary trailing data, separated by white space.
-
Field Details
-
ANNOTATION_FILE_EXTENSION
- See Also:
- Constant Field Values
-
CLASS_PREFIX
- See Also:
- Constant Field Values
-
SUPER_PREFIX
- See Also:
- Constant Field Values
-
NULLABLE
public static final char NULLABLERepresentation of a 'nullable' annotation, independent of the concrete annotation name used in Java sources.- See Also:
- Constant Field Values
-
NONNULL
public static final char NONNULLRepresentation of a 'nonnull' annotation, independent of the concrete annotation name used in Java sources.- See Also:
- Constant Field Values
-
NO_ANNOTATION
public static final char NO_ANNOTATIONRepresents absence of a null annotation. Useful for removing an existing null annotation. This character is used only internally, it is not part of the Eclipse External Annotation file format.- See Also:
- Constant Field Values
-
ANNOTATION_FILE_SUFFIX
- See Also:
- Constant Field Values
-
-
Constructor Details
-
ExternalAnnotationProvider
Create and initialize.- Parameters:
input- open input stream to read the annotations from, will be closed by the constructor.typeName- slash-separated qualified name of a type- Throws:
IOException- various issues when accessing the annotation file
-
-
Method Details
-
assertClassHeader
Assert that the given line is a class header for 'typeName' (slash-separated qualified name).- Throws:
IOException
-
extractSignature
Extract the signature from a line of an external annotation file. Answers null if line is not in the expected format. -
trimTail
Lines may contain arbitrary trailing data, separated by white space. -
forTypeHeader
-
forMethod
public ITypeAnnotationWalker forMethod(char[] selector, char[] signature, LookupEnvironment environment) -
forField
public ITypeAnnotationWalker forField(char[] selector, char[] signature, LookupEnvironment environment) -
toString
-