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) booleanReturns true if thisAElementequalso(see warnings below).inthashCode()booleanisEmpty()Returns true if thisAElementis empty.voidprune()Removes empty subelements of thisAElementdepth-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:AElementReturns true if thisAElementequalso(see warnings below). Generally speaking, twoAElements 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
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 shouldAElement.prune()bothAElements 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:AElementReturns true if thisAElementis empty. -
prune
public void prune()Description copied from class:AElementRemoves empty subelements of thisAElementdepth-first. -
toString
-
accept
-