Class ATypeElementWithType

All Implemented Interfaces:
Cloneable

public class ATypeElementWithType extends ATypeElement
An ATypeElement that also stores an un-annotated type. This is useful for cast insertion or receiver insertion.
  • Method Details

    • clone

      public ATypeElementWithType clone()
      Overrides:
      clone in class ATypeElement
    • getType

      public Type getType()
      Gets the un-annotated type.
      Returns:
      the un-annotated type
    • setType

      public void setType(Type type)
      Sets the un-annotated type.
      Parameters:
      type - the un-annotated type
    • 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
    • equalsTypeElementWithType

      public boolean equalsTypeElementWithType(ATypeElementWithType o)
      Returns true if this ATypeElementWithType equals o.
    • hashCode

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

      public boolean isEmpty()
      Description copied from class: AElement
      Returns true if this AElement is empty.
      Overrides:
      isEmpty in class ATypeElement
      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 ATypeElement
    • toString

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

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