public class BinaryExpression extends Expression
Constructor and Description |
---|
BinaryExpression(Expression leftExpression,
Token operation,
Expression rightExpression) |
Modifier and Type | Method and Description |
---|---|
Expression |
getLeftExpression() |
Token |
getOperation() |
Expression |
getRightExpression() |
String |
getText() |
static BinaryExpression |
newAssignmentExpression(Variable variable,
Expression rhs)
Creates an assignment expression in which the specified expression
is written into the specified variable name.
|
static BinaryExpression |
newInitializationExpression(String variable,
ClassNode type,
Expression rhs)
Creates variable initialization expression in which the specified expression
is written into the specified variable name.
|
void |
setLeftExpression(Expression leftExpression) |
void |
setRightExpression(Expression rightExpression) |
String |
toString() |
Expression |
transformExpression(ExpressionTransformer transformer)
Return a copy of the expression calling the transformer on any nested expressions
|
void |
visit(GroovyCodeVisitor visitor) |
getType, setType, transformExpressions, transformExpressions
addAnnotation, addAnnotations, getAnnotations, getAnnotations, getDeclaringClass, hasNoRealSourcePosition, isSynthetic, setDeclaringClass, setHasNoRealSourcePosition, setSynthetic
copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getNodeMetaData, putNodeMetaData, removeNodeMetaData, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setNodeMetaData, setSourcePosition
public BinaryExpression(Expression leftExpression, Token operation, Expression rightExpression)
public void visit(GroovyCodeVisitor visitor)
public Expression transformExpression(ExpressionTransformer transformer)
Expression
transformExpression
in class Expression
public Expression getLeftExpression()
public void setLeftExpression(Expression leftExpression)
public void setRightExpression(Expression rightExpression)
public Token getOperation()
public Expression getRightExpression()
public static BinaryExpression newAssignmentExpression(Variable variable, Expression rhs)
public static BinaryExpression newInitializationExpression(String variable, ClassNode type, Expression rhs)