Package org.codehaus.groovy.ast.expr
Class BinaryExpression
java.lang.Object
org.codehaus.groovy.ast.ASTNode
org.codehaus.groovy.ast.AnnotatedNode
org.codehaus.groovy.ast.expr.Expression
org.codehaus.groovy.ast.expr.BinaryExpression
- Direct Known Subclasses:
CompareIdentityExpression
,CompareToNullExpression
,DeclarationExpression
Represents two expressions and an operation
- Author:
- James Strachan
-
Constructor Summary
ConstructorDescriptionBinaryExpression
(Expression leftExpression, Token operation, Expression rightExpression) -
Method Summary
Modifier and TypeMethodDescriptiongetText()
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) toString()
transformExpression
(ExpressionTransformer transformer) Return a copy of the expression calling the transformer on any nested expressionsvoid
visit
(GroovyCodeVisitor visitor) Methods inherited from class org.codehaus.groovy.ast.expr.Expression
getType, setType, transformExpressions, transformExpressions
Methods inherited from class org.codehaus.groovy.ast.AnnotatedNode
addAnnotation, addAnnotations, getAnnotations, getAnnotations, getDeclaringClass, hasNoRealSourcePosition, isSynthetic, setDeclaringClass, setHasNoRealSourcePosition, setSynthetic
Methods inherited from class org.codehaus.groovy.ast.ASTNode
copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getNodeMetaData, getNodeMetaData, putNodeMetaData, removeNodeMetaData, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setNodeMetaData, setSourcePosition
-
Constructor Details
-
BinaryExpression
-
-
Method Details
-
toString
-
visit
-
transformExpression
Description copied from class:Expression
Return a copy of the expression calling the transformer on any nested expressions- Specified by:
transformExpression
in classExpression
-
getLeftExpression
-
setLeftExpression
-
setRightExpression
-
getOperation
-
getRightExpression
-
getText
-
newAssignmentExpression
Creates an assignment expression in which the specified expression is written into the specified variable name. -
newInitializationExpression
public 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.
-