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, insertTypecasts
Fields 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()
boolean
Returns true if thisAElement
equalso
(see warnings below).getName()
Returns the name of this field or formal parameter.Returns javac's representation of the type of this.void
Set the name of this field or formal parameter.void
setTypeMirror
(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, prune
Methods 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: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.
- Overrides:
equals
in 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:
toString
in classADeclaration
- Returns:
- a printed representation of this
-
accept
- Specified by:
accept
in classADeclaration
-