Klasse BcelAnnotation

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

public class BcelAnnotation extends AbstractAnnotationAJ
Wraps a Bcel Annotation object and uses it to answer AnnotationAJ method calls. This is cheaper than translating all Bcel annotations into AnnotationAJ objects.
Autor:
AndyClement
  • Konstruktordetails

  • Methodendetails

    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object
    • 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.
    • hasNameValuePair

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

      public boolean hasNamedValue(String name)
      Angegeben von:
      hasNamedValue in Schnittstelle AnnotationAJ
      Angegeben von:
      hasNamedValue in Klasse AbstractAnnotationAJ
      Parameter:
      name - the name of the value
      Gibt zurück:
      true if there is a value with that name
    • 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)
    • 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
    • getBcelAnnotation

      public AnnotationGen getBcelAnnotation()
      Gibt zurück:
      return the real bcel annotation being wrapped
    • 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