Class ADeclaration
java.lang.Object
org.checkerframework.afu.scenelib.el.AElement
org.checkerframework.afu.scenelib.el.ADeclaration
- All Implemented Interfaces:
Cloneable
A declaration, as opposed to an expression. Base class for AClass, AMethod, and AField.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal VivifyingMap
<ASTPath, ATypeElement> The element's insert-annotation invocations; map key is the AST path to the insertion place.The element's annotated insert-typecast invocations; map key is the AST path to the insertion placeFields inherited from class org.checkerframework.afu.scenelib.el.AElement
description, tlAnnotationsHere, type
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract <R,
T> R accept
(ElementVisitor<R, T> v, T t) boolean
Returns true if thisAElement
equalso
(see warnings below).int
hashCode()
boolean
isEmpty()
Returns true if thisAElement
is empty.void
prune()
Removes empty subelements of thisAElement
depth-first.toString()
Methods inherited from class org.checkerframework.afu.scenelib.el.AElement
clone, equals, lookup, tlAnnotationsHereFormatted
-
Field Details
-
insertAnnotations
The element's insert-annotation invocations; map key is the AST path to the insertion place. -
insertTypecasts
The element's annotated insert-typecast invocations; map key is the AST path to the insertion place
-
-
Constructor Details
-
ADeclaration
-
-
Method Details
-
equals
Description copied from class:AElement
Returns true if thisAElement
equalso
(see warnings below). Generally speaking, twoAElement
s are equal if they are of the same type, have the sameAElement.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
AElement
s are equal even if order of subelements differs. - Two
AElement
s 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 shouldAElement.prune()
bothAElement
s first.
- While subelement collections usually remember the order in which subelements were added
and regurgitate them in this order, two
-
hashCode
public int hashCode() -
isEmpty
public boolean isEmpty()Description copied from class:AElement
Returns true if thisAElement
is empty. -
prune
public void prune()Description copied from class:AElement
Removes empty subelements of thisAElement
depth-first. -
toString
-
accept
-