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() |
java.lang.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(java.lang.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) |
java.lang.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, getNodeMetaData, putNodeMetaData, removeNodeMetaData, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setNodeMetaData, setSourcePosition
public BinaryExpression(Expression leftExpression, Token operation, Expression rightExpression)
public java.lang.String toString()
toString
in class java.lang.Object
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(java.lang.String variable, ClassNode type, Expression rhs)