
public final class JsObjectLiteral extends JsLiteral
| Constructor and Description |
|---|
JsObjectLiteral(SourceInfo sourceInfo) |
| Modifier and Type | Method and Description |
|---|---|
void |
addProperty(SourceInfo sourceInfo,
JsExpression label,
JsExpression value)
Adds a property and its initial value to the object literal.
|
boolean |
equals(Object that) |
NodeKind |
getKind() |
List<JsPropertyInitializer> |
getPropertyInitializers() |
int |
hashCode() |
boolean |
hasSideEffects()
Determines whether the expression can cause side effects.
|
boolean |
isBooleanFalse() |
boolean |
isBooleanTrue() |
boolean |
isDefinitelyNotNull()
True if the target expression is definitely not null.
|
boolean |
isDefinitelyNull()
True if the target expression is definitely null.
|
boolean |
isInternable()
Some object literals are not mutated and hence internable.
|
void |
setInternable() |
void |
traverse(JsVisitor v,
JsContext ctx)
Causes this object to have the visitor visit itself and its children.
|
isLeaf, makeStmtgetSourceInfo, setSourceInfo, toSource, toSource, toStringpublic JsObjectLiteral(SourceInfo sourceInfo)
public void addProperty(SourceInfo sourceInfo, JsExpression label, JsExpression value)
NOTE: Does not check for duplicate names.
public List<JsPropertyInitializer> getPropertyInitializers()
public boolean hasSideEffects()
JsExpressionhasSideEffects in class JsExpressionpublic boolean isBooleanFalse()
public boolean isBooleanTrue()
public boolean isDefinitelyNotNull()
JsExpressionisDefinitelyNotNull in class JsExpressionpublic boolean isDefinitelyNull()
JsExpressionisDefinitelyNull in class JsExpressionpublic void traverse(JsVisitor v, JsContext ctx)
JsVisitablev - the visitor that should traverse this nodectx - the context of an existing traversalpublic boolean isInternable()
isInternable in class JsLiteralpublic void setInternable()
Copyright © 2018. All rights reserved.