public final class JsNameRef extends JsExpression implements CanBooleanEval, HasName
Constructor and Description |
---|
JsNameRef(SourceInfo sourceInfo,
JsName name) |
JsNameRef(SourceInfo sourceInfo,
String ident) |
Modifier and Type | Method and Description |
---|---|
String |
getIdent() |
NodeKind |
getKind() |
JsName |
getName() |
JsExpression |
getQualifier() |
String |
getShortIdent() |
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 |
isLeaf()
Determines whether or not this expression is a leaf, such as a
JsNameRef ,
JsBooleanLiteral , and so on. |
boolean |
isResolved() |
void |
resolve(JsName name) |
void |
setQualifier(JsExpression qualifier) |
void |
traverse(JsVisitor v,
JsContext ctx)
Causes this object to have the visitor visit itself and its children.
|
makeStmt
getSourceInfo, setSourceInfo, toSource, toSource, toString
public JsNameRef(SourceInfo sourceInfo, JsName name)
public JsNameRef(SourceInfo sourceInfo, String ident)
public String getIdent()
public JsExpression getQualifier()
public String getShortIdent()
public boolean hasSideEffects()
JsExpression
hasSideEffects
in class JsExpression
public boolean isBooleanFalse()
isBooleanFalse
in interface CanBooleanEval
public boolean isBooleanTrue()
isBooleanTrue
in interface CanBooleanEval
public boolean isDefinitelyNotNull()
JsExpression
isDefinitelyNotNull
in class JsExpression
public boolean isDefinitelyNull()
JsExpression
isDefinitelyNull
in class JsExpression
public boolean isLeaf()
JsExpression
JsNameRef
,
JsBooleanLiteral
, and so on. Leaf expressions never need to be parenthesized.isLeaf
in class JsExpression
public boolean isResolved()
public void resolve(JsName name)
public void setQualifier(JsExpression qualifier)
public void traverse(JsVisitor v, JsContext ctx)
JsVisitable
traverse
in interface JsVisitable
v
- the visitor that should traverse this nodectx
- the context of an existing traversalCopyright © 2018. All rights reserved.