Class ExternalAnnotationProvider

java.lang.Object
org.aspectj.org.eclipse.jdt.internal.compiler.classfmt.ExternalAnnotationProvider

public class ExternalAnnotationProvider extends Object
  • Field Details

    • ANNOTATION_FILE_EXTENSION

      public static final String ANNOTATION_FILE_EXTENSION
      See Also:
      Constant Field Values
    • CLASS_PREFIX

      public static final String CLASS_PREFIX
      See Also:
      Constant Field Values
    • SUPER_PREFIX

      public static final String SUPER_PREFIX
      See Also:
      Constant Field Values
    • NULLABLE

      public static final char NULLABLE
      Representation of a 'nullable' annotation, independent of the concrete annotation name used in Java sources.
      See Also:
      Constant Field Values
    • NONNULL

      public static final char NONNULL
      Representation 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_ANNOTATION
      Represents 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

      public static final String ANNOTATION_FILE_SUFFIX
      See Also:
      Constant Field Values
  • Constructor Details

    • ExternalAnnotationProvider

      public ExternalAnnotationProvider(InputStream input, String typeName) throws IOException
      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

      public static void assertClassHeader(String line, String typeName) throws IOException
      Assert that the given line is a class header for 'typeName' (slash-separated qualified name).
      Throws:
      IOException
    • extractSignature

      public static String extractSignature(String line)
      Extract the signature from a line of an external annotation file. Answers null if line is not in the expected format.
    • trimTail

      protected static String trimTail(String line)
      Lines may contain arbitrary trailing data, separated by white space.
    • forTypeHeader

      public ITypeAnnotationWalker forTypeHeader(LookupEnvironment environment)
    • forMethod

      public ITypeAnnotationWalker forMethod(char[] selector, char[] signature, LookupEnvironment environment)
    • forField

      public ITypeAnnotationWalker forField(char[] selector, char[] signature, LookupEnvironment environment)
    • toString

      public String toString()
      Overrides:
      toString in class Object