Alle implementierten Schnittstellen:
TypeConstants, TypeIds
Bekannte direkte Unterklassen:
MarkerAnnotation, NormalAnnotation, SingleMemberAnnotation

public abstract class Annotation extends Expression
Annotation
  • Felddetails

    • declarationSourceEnd

      public int declarationSourceEnd
    • recipient

      public Binding recipient
    • type

      public TypeReference type
    • compilerAnnotation

      protected AnnotationBinding compilerAnnotation
      The representation of this annotation in the type system.
  • Konstruktordetails

    • Annotation

      public Annotation()
  • Methodendetails

    • getLocations

      public static int[] getLocations(Expression reference, Annotation annotation)
      Return the location for the corresponding annotation inside the type reference, null if none.
    • getRetentionPolicy

      public static long getRetentionPolicy(char[] policyName)
    • getTargetElementType

      public static long getTargetElementType(char[] elementName)
    • computeElementValuePairs

      public ElementValuePair[] computeElementValuePairs()
    • nullLocationBitsFromAnnotationValue

      public static int nullLocationBitsFromAnnotationValue(Object value)
      Convert the value() attribute of @NonNullByDefault into a bitvector a la Binding.NullnessDefaultMASK. This method understands value encodings from source and binary types. pre: null annotation analysis is enabled
    • nullLocationBitsFromElementTypeAnnotationValue

      public static int nullLocationBitsFromElementTypeAnnotationValue(Object value)
    • checkRepeatableMetaAnnotation

      public void checkRepeatableMetaAnnotation(BlockScope scope)
    • checkContainerAnnotationType

      public static void checkContainerAnnotationType(ASTNode culpritNode, BlockScope scope, ReferenceBinding containerAnnotationType, ReferenceBinding repeatableAnnotationType, boolean useSite)
    • checkContainingAnnotationTargetAtUse

      public static void checkContainingAnnotationTargetAtUse(Annotation repeatingAnnotation, BlockScope scope, TypeBinding containerAnnotationType, TypeBinding repeatingAnnotationType)
    • getCompilerAnnotation

      public AnnotationBinding getCompilerAnnotation()
    • isRuntimeInvisible

      public boolean isRuntimeInvisible()
    • isRuntimeTypeInvisible

      public boolean isRuntimeTypeInvisible(boolean targetingTypeParameter)
    • isRuntimeTypeVisible

      public boolean isRuntimeTypeVisible(boolean targetingTypeParameter)
    • isRuntimeVisible

      public boolean isRuntimeVisible()
    • memberValuePairs

      public abstract MemberValuePair[] memberValuePairs()
    • printExpression

      public StringBuffer printExpression(int indent, StringBuffer output)
      Angegeben von:
      printExpression in Klasse Expression
    • recordSuppressWarnings

      public void recordSuppressWarnings(Scope scope, int startSuppresss, int endSuppress, boolean isSuppressingWarnings)
    • resolveType

      public TypeBinding resolveType(BlockScope scope)
      Beschreibung aus Klasse kopiert: Expression
      Resolve the type of this expression in the context of a blockScope
      Setzt außer Kraft:
      resolveType in Klasse Expression
      Parameter:
      scope -
      Gibt zurück:
      Return the actual type of this expression after resolution
    • handleNonNullByDefault

      public long handleNonNullByDefault(BlockScope scope)
    • isAnnotationTargetAllowed

      public static boolean isAnnotationTargetAllowed(BlockScope scope, TypeBinding annotationType, Binding recipient)
    • checkForInstancesOfRepeatableWithRepeatingContainerAnnotation

      public static void checkForInstancesOfRepeatableWithRepeatingContainerAnnotation(BlockScope scope, ReferenceBinding repeatedAnnotationType, Annotation[] sourceAnnotations)
      Check to see if a repeating annotation is in fact of a container annotation type for an annotation which is also present at the same target.
      Parameter:
      scope - The scope (for error reporting)
      repeatedAnnotationType - Type of annotation which has been repeated (to check for possibly being a container for a repeatable annotation)
      sourceAnnotations - The annotations to check
    • isTypeUseCompatible

      public static boolean isTypeUseCompatible(TypeReference reference, Scope scope)
    • isTypeUseCompatible

      public static void isTypeUseCompatible(TypeReference reference, Scope scope, Annotation[] annotations)
    • hasNullBit

      public boolean hasNullBit(int bit)
    • traverse

      public abstract void traverse(ASTVisitor visitor, BlockScope scope)
      Beschreibung aus Klasse kopiert: Expression
      Traverse an expression in the context of a blockScope
      Setzt außer Kraft:
      traverse in Klasse Expression
      Parameter:
      visitor -
      scope -
    • traverse

      public abstract void traverse(ASTVisitor visitor, ClassScope scope)
      Beschreibung aus Klasse kopiert: Expression
      Traverse an expression in the context of a classScope
      Setzt außer Kraft:
      traverse in Klasse Expression
      Parameter:
      visitor -
      scope -
    • getPersistibleAnnotation

      public Annotation getPersistibleAnnotation()
    • setPersistibleAnnotation

      public void setPersistibleAnnotation(ContainerAnnotation container)