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:
DeclarationExpression
Represents two expressions and an operation
- Version:
- $Revision$
- Author:
- James Strachan
-
Constructor Summary
ConstructorsConstructorDescriptionBinaryExpression(Expression leftExpression, Token operation, Expression rightExpression) -
Method Summary
Modifier and TypeMethodDescriptiongetText()static BinaryExpressionnewAssignmentExpression(Variable variable, Expression rhs) Creates an assignment expression in which the specified expression is written into the specified variable name.static BinaryExpressionnewInitializationExpression(String variable, ClassNode type, Expression rhs) Creates variable initialization expression in which the specified expression is written into the specified variable name.voidsetLeftExpression(Expression leftExpression) voidsetRightExpression(Expression rightExpression) toString()transformExpression(ExpressionTransformer transformer) Return a copy of the expression calling the transformer on any nested expressionsvoidvisit(GroovyCodeVisitor visitor) Methods inherited from class org.codehaus.groovy.ast.expr.Expression
getType, setType, transformExpressions, transformExpressionsMethods inherited from class org.codehaus.groovy.ast.AnnotatedNode
addAnnotation, addAnnotations, getAnnotations, getAnnotations, getDeclaringClass, hasNoRealSourcePosition, isSynthetic, setDeclaringClass, setHasNoRealSourcePosition, setSyntheticMethods inherited from class org.codehaus.groovy.ast.ASTNode
copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getNodeMetaData, putNodeMetaData, removeNodeMetaData, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setNodeMetaData, setSourcePosition
-
Constructor Details
-
BinaryExpression
-
-
Method Details
-
toString
-
visit
-
transformExpression
Description copied from class:ExpressionReturn a copy of the expression calling the transformer on any nested expressions- Specified by:
transformExpressionin classExpression- Parameters:
transformer-
-
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.
-