Class ADeclaration

java.lang.Object
org.checkerframework.afu.scenelib.el.AElement
org.checkerframework.afu.scenelib.el.ADeclaration
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
AClass, AField, AMethod

public abstract class ADeclaration extends AElement
A declaration, as opposed to an expression. Base class for AClass, AMethod, and AField.
  • Field Details

    • insertAnnotations

      public final VivifyingMap<ASTPath,ATypeElement> insertAnnotations
      The element's insert-annotation invocations; map key is the AST path to the insertion place.
    • insertTypecasts

      public final VivifyingMap<ASTPath,ATypeElementWithType> insertTypecasts
      The element's annotated insert-typecast invocations; map key is the AST path to the insertion place
  • Constructor Details

    • ADeclaration

      protected ADeclaration(Object description)
  • Method Details

    • equals

      public boolean equals(Object o)
      Description copied from class: AElement
      Returns true if this AElement equals o (see warnings below). Generally speaking, two AElements are equal if they are of the same type, have the same AElement.tlAnnotationsHere, and have recursively equal, corresponding subelements. Two warnings:
      • While subelement collections usually remember the order in which subelements were added and regurgitate them in this order, two AElements are equal even if order of subelements differs.
      • Two AElements are unequal if one has a subelement that the other does not, even if the tree of elements rooted at the subelement contains no annotations. Thus, if you want to compare the annotations, you should AElement.prune() both AElements first.
      Overrides:
      equals in class AElement
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class AElement
    • isEmpty

      public boolean isEmpty()
      Description copied from class: AElement
      Returns true if this AElement is empty.
      Overrides:
      isEmpty in class AElement
      Returns:
      true iff this is empty
    • prune

      public void prune()
      Description copied from class: AElement
      Removes empty subelements of this AElement depth-first.
      Overrides:
      prune in class AElement
    • toString

      public String toString()
      Overrides:
      toString in class AElement
    • accept

      public abstract <R, T> R accept(ElementVisitor<R,T> v, T t)
      Overrides:
      accept in class AElement