public class JMultiExpression extends JExpression
Constructor and Description |
---|
JMultiExpression(SourceInfo info,
Collection<JExpression> expressions)
Construct a multi expression containing
expressions . |
JMultiExpression(SourceInfo info,
JExpression... expressions)
Construct a multi expression containing
expressions if any. |
Modifier and Type | Method and Description |
---|---|
void |
addExpressions(int index,
List<JExpression> expressions)
Adds a list of expressions to the multi expression at position
index . |
void |
addExpressions(JExpression... expressions)
Adds
expressions to the multi expression at the end. |
void |
addExpressions(List<JExpression> expressions)
Adds a list of expressions to the multi expression at the end.
|
JExpression |
getExpression(int index)
Returns the expression at
index . |
List<JExpression> |
getExpressions()
Returns the list of expressions.
|
int |
getNumberOfExpressions()
Returns the number of expressions directly included in the multi expression.
|
JType |
getType()
Returns the multi expression type, i.e.
|
boolean |
hasSideEffects() |
boolean |
isEmpty()
Returns
true if the multi expression is empty. |
JExpression |
removeExpression(int index)
Removes the expression at
index from this multi expression. |
void |
setExpression(int index,
JExpression expression)
Replaces the expression at
index by expression . |
void |
traverse(JVisitor visitor,
Context ctx)
Causes this object to have the visitor visit itself and its children.
|
makeStatement
getSourceInfo, setSourceInfo, toSource, toString
public JMultiExpression(SourceInfo info, JExpression... expressions)
expressions
if any.public JMultiExpression(SourceInfo info, Collection<JExpression> expressions)
expressions
.public void addExpressions(JExpression... expressions)
expressions
to the multi expression at the end.public void addExpressions(List<JExpression> expressions)
public void addExpressions(int index, List<JExpression> expressions)
index
.public JExpression getExpression(int index)
index
.public List<JExpression> getExpressions()
public int getNumberOfExpressions()
public JType getType()
void
if empty.public boolean hasSideEffects()
hasSideEffects
in class JExpression
public boolean isEmpty()
true
if the multi expression is empty.public JExpression removeExpression(int index)
index
from this multi expression.public void setExpression(int index, JExpression expression)
index
by expression
.public void traverse(JVisitor visitor, Context ctx)
JVisitable
visitor
- the visitor that should traverse this nodectx
- the context of an existing traversalCopyright © 2018. All rights reserved.