Class ATypeElementWithType
java.lang.Object
org.checkerframework.afu.scenelib.el.AElement
org.checkerframework.afu.scenelib.el.ATypeElement
org.checkerframework.afu.scenelib.el.ATypeElementWithType
- All Implemented Interfaces:
Cloneable
An
ATypeElement that also stores an un-annotated type. This is useful for cast insertion
or receiver insertion.-
Field Summary
Fields inherited from class org.checkerframework.afu.scenelib.el.ATypeElement
innerTypesFields inherited from class org.checkerframework.afu.scenelib.el.AElement
description, tlAnnotationsHere -
Method Summary
Modifier and TypeMethodDescription<R,T> R accept(ElementVisitor<R, T> v, T t) clone()booleanReturns true if thisAElementequalso(see warnings below).booleanReturns true if thisATypeElementWithTypeequalso.getType()Gets the un-annotated type.inthashCode()booleanisEmpty()Returns true if thisAElementis empty.voidprune()Removes empty subelements of thisAElementdepth-first.voidSets the un-annotated type.toString()Methods inherited from class org.checkerframework.afu.scenelib.el.ATypeElement
equalsMethods inherited from class org.checkerframework.afu.scenelib.el.AElement
lookup, tlAnnotationsHereFormatted
-
Method Details
-
clone
- Overrides:
clonein classATypeElement
-
getType
Gets the un-annotated type.- Returns:
- the un-annotated type
-
setType
Sets the un-annotated type.- Parameters:
type- the un-annotated type
-
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
-
equalsTypeElementWithType
Returns true if thisATypeElementWithTypeequalso. -
hashCode
public int hashCode()- Overrides:
hashCodein classATypeElement
-
isEmpty
public boolean isEmpty()Description copied from class:AElementReturns true if thisAElementis empty.- Overrides:
isEmptyin classATypeElement- Returns:
- true iff this is empty
-
prune
public void prune()Description copied from class:AElementRemoves empty subelements of thisAElementdepth-first.- Overrides:
prunein classATypeElement
-
toString
- Overrides:
toStringin classATypeElement
-
accept
- Overrides:
acceptin classATypeElement
-