public class ExternalAnnotationProvider
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
ExternalAnnotationProvider.IMethodAnnotationWalker |
class |
ExternalAnnotationProvider.TypeParametersAnnotationWalker
Walker that may serve the annotations on type parameters of the current class or method.
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ANNOTION_FILE_EXTENSION |
static java.lang.String |
CLASS_PREFIX |
static char |
NO_ANNOTATION
Represents absence of a null annotation.
|
static char |
NONNULL
Representation of a 'nonnull' annotation, independent of the concrete annotation name used in Java sources.
|
static char |
NULLABLE
Representation of a 'nullable' annotation, independent of the concrete annotation name used in Java sources.
|
static java.lang.String |
SUPER_PREFIX |
| Constructor and Description |
|---|
ExternalAnnotationProvider(java.io.InputStream input,
java.lang.String typeName)
Create and initialize.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
assertClassHeader(java.lang.String line,
java.lang.String typeName)
Assert that the given line is a class header for 'typeName' (slash-separated qualified name).
|
static java.lang.String |
extractSignature(java.lang.String line)
Extract the signature from a line of an external annotation file.
|
ITypeAnnotationWalker |
forField(char[] selector,
char[] signature,
LookupEnvironment environment) |
ITypeAnnotationWalker |
forMethod(char[] selector,
char[] signature,
LookupEnvironment environment) |
ITypeAnnotationWalker |
forTypeHeader(LookupEnvironment environment) |
java.lang.String |
toString() |
protected static java.lang.String |
trimTail(java.lang.String line)
Lines may contain arbitrary trailing data, separated by white space.
|
public static final java.lang.String ANNOTION_FILE_EXTENSION
public static final java.lang.String CLASS_PREFIX
public static final java.lang.String SUPER_PREFIX
public static final char NULLABLE
public static final char NONNULL
public static final char NO_ANNOTATION
public ExternalAnnotationProvider(java.io.InputStream input,
java.lang.String typeName)
throws java.io.IOException
input - open input stream to read the annotations from, will be closed by the constructor.typeName - slash-separated qualified name of a typejava.io.IOException - various issues when accessing the annotation filepublic static void assertClassHeader(java.lang.String line,
java.lang.String typeName)
throws java.io.IOException
java.io.IOExceptionpublic static java.lang.String extractSignature(java.lang.String line)
protected static java.lang.String trimTail(java.lang.String line)
public ITypeAnnotationWalker forTypeHeader(LookupEnvironment environment)
public ITypeAnnotationWalker forMethod(char[] selector, char[] signature, LookupEnvironment environment)
public ITypeAnnotationWalker forField(char[] selector, char[] signature, LookupEnvironment environment)
public java.lang.String toString()
toString in class java.lang.Object