Class AField
java.lang.Object
org.checkerframework.afu.scenelib.el.AElement
org.checkerframework.afu.scenelib.el.ADeclaration
org.checkerframework.afu.scenelib.el.AField
- All Implemented Interfaces:
Cloneable
A field or method formal parameter.
-
Field Summary
FieldsFields inherited from class org.checkerframework.afu.scenelib.el.ADeclaration
insertAnnotations, insertTypecastsFields inherited from class org.checkerframework.afu.scenelib.el.AElement
description, tlAnnotationsHere, type -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<R,T> R accept(ElementVisitor<R, T> v, T t) clone()booleanReturns true if thisAElementequalso(see warnings below).getName()Returns the name of this field or formal parameter.Returns javac's representation of the type of this.voidSet the name of this field or formal parameter.voidsetTypeMirror(TypeMirror typeMirror) Set the TypeMirror this.toString()Returns a printed representation of this.Methods inherited from class org.checkerframework.afu.scenelib.el.ADeclaration
hashCode, isEmpty, pruneMethods inherited from class org.checkerframework.afu.scenelib.el.AElement
equals, lookup, tlAnnotationsHereFormatted
-
Field Details
-
init
The field's initializer.
-
-
Constructor Details
-
AField
Create an AField of the given name.- Parameters:
name- the name of the field or formal parameter
-
AField
Create an AField of the given name and type.- Parameters:
name- the name of the field or formal parametertypeMirror- javac's representation of the type of the wrapped field
-
AField
Create an AField that is a copy of the given one.- Parameters:
field- the AField to copy
-
-
Method Details
-
getName
Returns the name of this field or formal parameter.- Returns:
- the name of this field or formal parameter
-
setName
Set the name of this field or formal parameter.- Parameters:
newName- the new name of this field or formal parameter
-
getTypeMirror
Returns javac's representation of the type of this.- Returns:
- javac's representation of the type of this
-
setTypeMirror
Set the TypeMirror this.- Parameters:
typeMirror- javac's representation of the type of this
-
clone
-
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.
- Overrides:
equalsin classADeclaration
- While subelement collections usually remember the order in which subelements were added
and regurgitate them in this order, two
-
toString
Returns a printed representation of this.- Overrides:
toStringin classADeclaration- Returns:
- a printed representation of this
-
accept
- Specified by:
acceptin classADeclaration
-