public final class JsObjectLiteral extends JsLiteral
Modifier and Type | Class and Description |
---|---|
static class |
JsObjectLiteral.Builder
Builder class for JsObjectLiterals.
|
Modifier and Type | Field and Description |
---|---|
static JsObjectLiteral |
EMPTY |
Modifier and Type | Method and Description |
---|---|
static JsObjectLiteral.Builder |
builder(SourceInfo info) |
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 |
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, makeStmt
getSourceInfo, setSourceInfo, toSource, toSource, toString
public static final JsObjectLiteral EMPTY
public static JsObjectLiteral.Builder builder(SourceInfo info)
public List<JsPropertyInitializer> getPropertyInitializers()
public boolean hasSideEffects()
JsExpression
hasSideEffects
in class JsExpression
public boolean isBooleanFalse()
public boolean isBooleanTrue()
public boolean isDefinitelyNull()
JsExpression
isDefinitelyNull
in class JsExpression
public void traverse(JsVisitor v, JsContext ctx)
JsVisitable
v
- the visitor that should traverse this nodectx
- the context of an existing traversalpublic boolean isInternable()
isInternable
in class JsLiteral
public void setInternable()
Copyright © 2018. All rights reserved.