Klasse DeclareAnnotation

Alle implementierten Schnittstellen:
IHasPosition, IHasSourceLocation

public class DeclareAnnotation extends Declare
Represents a declare annotation statement, one of atField, atMethod, atConstructor or atType.
Autor:
Andy Clement
  • Felddetails

  • Konstruktordetails

  • Methodendetails

    • getAnnotationString

      public String getAnnotationString()
      Returns the string, useful before the real annotation has been resolved
    • isExactPattern

      public boolean isExactPattern()
    • getAnnotationMethod

      public String getAnnotationMethod()
    • toString

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

      public Object accept(PatternNodeVisitor visitor, Object data)
      Angegeben von:
      accept in Klasse PatternNode
    • traverse

      public Object traverse(PatternNodeVisitor visitor, Object data)
      Setzt außer Kraft:
      traverse in Klasse PatternNode
    • resolve

      public void resolve(IScope scope)
      Beschreibung aus Klasse kopiert: Declare
      Returns this declare mutated
      Angegeben von:
      resolve in Klasse Declare
    • parameterizeWith

      public Declare parameterizeWith(Map<String,UnresolvedType> typeVariableBindingMap, World w)
      Beschreibung aus Klasse kopiert: Declare
      Returns a version of this declare element in which all references to type variables are replaced with their bindings given in the map.
      Angegeben von:
      parameterizeWith in Klasse Declare
    • isAdviceLike

      public boolean isAdviceLike()
      Beschreibung aus Klasse kopiert: Declare
      Indicates if this declare should be treated like advice. If true, the declare will have no effect in an abstract aspect. It will be inherited by any concrete aspects and will have an effect for each concrete aspect it is ultimately inherited by.
      Angegeben von:
      isAdviceLike in Klasse Declare
    • setAnnotationString

      public void setAnnotationString(String annotationString)
    • setAnnotationLocation

      public void setAnnotationLocation(int start, int end)
    • getAnnotationSourceStart

      public int getAnnotationSourceStart()
    • getAnnotationSourceEnd

      public int getAnnotationSourceEnd()
    • setAnnotationMethod

      public void setAnnotationMethod(String methodName)
    • equals

      public boolean equals(Object obj)
      Setzt außer Kraft:
      equals in Klasse Object
    • hashCode

      public int hashCode()
      Setzt außer Kraft:
      hashCode in Klasse Object
    • write

      public void write(CompressingDataOutputStream s) throws IOException
      Angegeben von:
      write in Klasse PatternNode
      Löst aus:
      IOException
    • read

      public static Declare read(VersionedDataInputStream s, ISourceContext context) throws IOException
      Löst aus:
      IOException
    • matches

      public boolean matches(ResolvedMember resolvedmember, World world)
      For declare atConstructor, atMethod, atField
    • matches

      public boolean matches(ResolvedType type)
      For declare atType.
    • setAspect

      public void setAspect(ResolvedType typeX)
    • getAspect

      public UnresolvedType getAspect()
    • copyAnnotationTo

      public void copyAnnotationTo(ResolvedType onType)
    • getAnnotation

      public AnnotationAJ getAnnotation()
      Gibt zurück:
      declared annotation; can be null for annotations with SOURCE retention, which of course are not present in the byte code
    • getTypePattern

      public TypePattern getTypePattern()
    • getSignaturePattern

      public ISignaturePattern getSignaturePattern()
    • isStarredAnnotationPattern

      public boolean isStarredAnnotationPattern()
    • getKind

      public DeclareAnnotation.Kind getKind()
    • isDeclareAtConstuctor

      public boolean isDeclareAtConstuctor()
    • isDeclareAtMethod

      public boolean isDeclareAtMethod()
    • isDeclareAtType

      public boolean isDeclareAtType()
    • isDeclareAtField

      public boolean isDeclareAtField()
    • getAnnotationType

      public ResolvedType getAnnotationType()
      Gibt zurück:
      the type of the annotation; can be null for annotations with SOURCE retention, which of course are not present in the byte code
    • isAnnotationAllowedOnField

      public boolean isAnnotationAllowedOnField()
      Gibt zurück:
      true if the annotation specified is allowed on a field
    • getPatternAsString

      public String getPatternAsString()
    • couldEverMatch

      public boolean couldEverMatch(ResolvedType type)
      Return true if this declare annotation could ever match something in the specified type - only really able to make intelligent decision if a type was specified in the sig/type pattern signature.
    • getNameSuffix

      public String getNameSuffix()
      Provide a name suffix so that we can tell the different declare annotations forms apart in the AjProblemReporter
      Angegeben von:
      getNameSuffix in Klasse Declare
    • setRemover

      public void setRemover(boolean b)
    • isRemover

      public boolean isRemover()