public final class JsConditional extends JsExpression
Constructor and Description |
---|
JsConditional(SourceInfo sourceInfo) |
JsConditional(SourceInfo sourceInfo,
JsExpression testExpr,
JsExpression thenExpr,
JsExpression elseExpr) |
Modifier and Type | Method and Description |
---|---|
JsExpression |
getElseExpression() |
NodeKind |
getKind() |
JsExpression |
getTestExpression() |
JsExpression |
getThenExpression() |
boolean |
hasSideEffects()
Determines whether the expression can cause side effects.
|
boolean |
isDefinitelyNull()
True if the target expression is definitely null.
|
void |
setElseExpression(JsExpression elseExpr) |
void |
setTestExpression(JsExpression testExpr) |
void |
setThenExpression(JsExpression thenExpr) |
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 JsConditional(SourceInfo sourceInfo)
public JsConditional(SourceInfo sourceInfo, JsExpression testExpr, JsExpression thenExpr, JsExpression elseExpr)
public JsExpression getElseExpression()
public JsExpression getTestExpression()
public JsExpression getThenExpression()
public boolean hasSideEffects()
JsExpression
hasSideEffects
in class JsExpression
public boolean isDefinitelyNull()
JsExpression
isDefinitelyNull
in class JsExpression
public void setElseExpression(JsExpression elseExpr)
public void setTestExpression(JsExpression testExpr)
public void setThenExpression(JsExpression thenExpr)
public void traverse(JsVisitor v, JsContext ctx)
JsVisitable
v
- the visitor that should traverse this nodectx
- the context of an existing traversalCopyright © 2018. All rights reserved.