Klasse StandardAnnotation

java.lang.Object
org.aspectj.weaver.AbstractAnnotationAJ
org.aspectj.weaver.StandardAnnotation
Alle implementierten Schnittstellen:
AnnotationAJ

public class StandardAnnotation extends AbstractAnnotationAJ
This type represents the weavers abstraction of an annotation - it is not tied to any underlying BCI toolkit. The weaver actualy handles these through AnnotationX wrapper objects - until we start transforming the BCEL annotations into this form (expensive) or offer a clever visitor mechanism over the BCEL annotation stuff that builds these annotation types directly.
Autor:
AndyClement
  • Konstruktordetails

    • StandardAnnotation

      public StandardAnnotation(ResolvedType type, boolean isRuntimeVisible)
  • Methodendetails

    • isRuntimeVisible

      public boolean isRuntimeVisible()
      Angegeben von:
      isRuntimeVisible in Schnittstelle AnnotationAJ
      Angegeben von:
      isRuntimeVisible in Klasse AbstractAnnotationAJ
      Gibt zurück:
      true if the annotation is marked for runtime visibility
    • stringify

      public String stringify()
      Angegeben von:
      stringify in Schnittstelle AnnotationAJ
      Angegeben von:
      stringify in Klasse AbstractAnnotationAJ
      Gibt zurück:
      String form of the annotation and any values, eg. @Foo(a=b,c=d)
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object
    • hasNamedValue

      public boolean hasNamedValue(String n)
      Angegeben von:
      hasNamedValue in Schnittstelle AnnotationAJ
      Angegeben von:
      hasNamedValue in Klasse AbstractAnnotationAJ
      Parameter:
      n - the name of the value
      Gibt zurück:
      true if there is a value with that name
    • hasNameValuePair

      public boolean hasNameValuePair(String n, String v)
      Angegeben von:
      hasNameValuePair in Schnittstelle AnnotationAJ
      Angegeben von:
      hasNameValuePair in Klasse AbstractAnnotationAJ
      Parameter:
      n - the name of the annotation field
      v - the value of the annotation field
      Gibt zurück:
      true if there is a value with the specified name and value
    • getTargets

      public Set<String> getTargets()
      Angegeben von:
      getTargets in Schnittstelle AnnotationAJ
      Angegeben von:
      getTargets in Klasse AbstractAnnotationAJ
      Gibt zurück:
      for the @target annotation, this will return a set of the element-types it can be applied to. For other annotations , it returns the empty set.
    • getNameValuePairs

      public List<AnnotationNameValuePair> getNameValuePairs()
    • hasNameValuePairs

      public boolean hasNameValuePairs()
    • addNameValuePair

      public void addNameValuePair(AnnotationNameValuePair pair)
    • getStringFormOfValue

      public String getStringFormOfValue(String name)
      Determine the string representation of the value of a field. For example in @SuppressAjWarnings({"adviceDidNotMatch"}) the return value for getStringFormOfValue("value") would be "[adviceDidNotMatch]".
      Parameter:
      name - the name of the annotation field being looked up
      Gibt zurück:
      string representation of the value of that field, may be null if no such field set