public class PropertyNode extends Node
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
computed |
protected FunctionNode |
getter
Property getter.
|
protected boolean |
isAnonymousFunctionDefinition |
protected boolean |
isStatic |
protected Expression |
key
Property key.
|
protected FunctionNode |
setter
Property setter.
|
protected Expression |
value
Property value.
|
| Modifier | Constructor and Description |
|---|---|
protected |
PropertyNode(long token,
int finish,
Expression key,
Expression value,
FunctionNode getter,
FunctionNode setter,
boolean isStatic,
boolean computed,
boolean isAnonymousFunctionDefinition) |
|
PropertyNode(long token,
int finish,
Expression key,
Expression value,
FunctionNode getter,
FunctionNode setter,
boolean isStatic,
boolean computed,
boolean coverInitializedName,
boolean proto) |
|
PropertyNode(long token,
int finish,
Expression key,
Expression value,
FunctionNode getter,
FunctionNode setter,
boolean isStatic,
boolean computed,
boolean coverInitializedName,
boolean proto,
boolean classField,
boolean isAnonymousFunctionDefinition)
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
|
com.oracle.truffle.api.strings.TruffleString |
getKeyNameTS() |
String |
getPrivateName() |
com.oracle.truffle.api.strings.TruffleString |
getPrivateNameTS() |
FunctionNode |
getSetter()
Get the setter for this property
|
Expression |
getValue()
Get the value of this property
|
boolean |
isAccessor() |
boolean |
isAnonymousFunctionDefinition() |
boolean |
isClassField() |
boolean |
isClassStaticBlock() |
boolean |
isComputed() |
boolean |
isCoverInitializedName() |
boolean |
isPrivate() |
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, toStringprotected final Expression key
protected final Expression value
protected final FunctionNode getter
protected final FunctionNode setter
protected final boolean isStatic
protected final boolean computed
protected final boolean isAnonymousFunctionDefinition
protected PropertyNode(long token,
int finish,
Expression key,
Expression value,
FunctionNode getter,
FunctionNode setter,
boolean isStatic,
boolean computed,
boolean isAnonymousFunctionDefinition)
public PropertyNode(long token,
int finish,
Expression key,
Expression value,
FunctionNode getter,
FunctionNode setter,
boolean isStatic,
boolean computed,
boolean coverInitializedName,
boolean proto)
public PropertyNode(long token,
int finish,
Expression key,
Expression value,
FunctionNode getter,
FunctionNode setter,
boolean isStatic,
boolean computed,
boolean coverInitializedName,
boolean proto,
boolean classField,
boolean isAnonymousFunctionDefinition)
token - tokenfinish - finishkey - the key of this propertyvalue - the value of this propertygetter - getter function bodysetter - setter function bodypublic String getKeyName()
public com.oracle.truffle.api.strings.TruffleString getKeyNameTS()
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()
public boolean isClassField()
public boolean isAnonymousFunctionDefinition()
public boolean isPrivate()
public String getPrivateName()
public com.oracle.truffle.api.strings.TruffleString getPrivateNameTS()
public boolean isAccessor()
public boolean isClassStaticBlock()