| Constructor and Description |
|---|
PropertyNode(long token,
int finish,
Expression key,
Expression value,
FunctionNode getter,
FunctionNode setter,
boolean isStatic,
boolean computed,
boolean coverInitializedName,
boolean proto)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
Node |
accept(NodeVisitor<? extends LexicalContext> visitor)
Provides a means to navigate the IR.
|
<R> R |
accept(TranslatorNodeVisitor<? extends LexicalContext,R> visitor)
Provides a means to navigate the IR.
|
FunctionNode |
getGetter()
Get the getter for this property
|
Expression |
getKey()
Return the key for this property node
|
String |
getKeyName()
Get the name of the property key
|
FunctionNode |
getSetter()
Get the setter for this property
|
Expression |
getValue()
Get the value of this property
|
boolean |
isComputed() |
boolean |
isCoverInitializedName() |
boolean |
isProto() |
boolean |
isRest() |
boolean |
isStatic() |
PropertyNode |
setGetter(FunctionNode getter)
Set the getter of this property, null if none
|
PropertyNode |
setSetter(FunctionNode setter)
Set the setter for this property, null if none
|
PropertyNode |
setValue(Expression value)
Set the value of this property
|
void |
toString(StringBuilder sb,
boolean printType)
Print logic that decides whether to show the optimistic type or not - for example it should
not be printed after just parse, when it hasn't been computed, or has been set to a trivially
provable value
|
clone, equals, getFinish, getSourceOrder, getStart, getToken, hashCode, isAssignment, isLoop, isTokenType, tokenType, toString, toStringpublic PropertyNode(long token,
int finish,
Expression key,
Expression value,
FunctionNode getter,
FunctionNode setter,
boolean isStatic,
boolean computed,
boolean coverInitializedName,
boolean proto)
token - tokenfinish - finishkey - the key of this propertyvalue - the value of this propertygetter - getter function bodysetter - setter function bodypublic String getKeyName()
public Node accept(NodeVisitor<? extends LexicalContext> visitor)
Nodepublic <R> R accept(TranslatorNodeVisitor<? extends LexicalContext,R> visitor)
Nodepublic void toString(StringBuilder sb, boolean printType)
Nodepublic FunctionNode getGetter()
public PropertyNode setGetter(FunctionNode getter)
getter - getterpublic Expression getKey()
public FunctionNode getSetter()
public PropertyNode setSetter(FunctionNode setter)
setter - setterpublic Expression getValue()
public PropertyNode setValue(Expression value)
value - new valuepublic boolean isStatic()
public boolean isComputed()
public boolean isCoverInitializedName()
public boolean isProto()
public boolean isRest()