## org.codehaus.groovy.ast.expr
Class DeclarationExpression

    java.lang.Object
      org.codehaus.groovy.ast.ASTNode
          org.codehaus.groovy.ast.expr.Expression
              org.codehaus.groovy.ast.expr.BinaryExpression
                  org.codehaus.groovy.ast.expr.DeclarationExpression

    public class DeclarationExpression

extends BinaryExpression

Represents a local variable name declaration, an expression like "def foo" or with type "String foo".

Version:
  $Revision: 6778 $
Author:
  Jochen Theodorou

Constructor Summary
`DeclarationExpression(VariableExpression left, Token operation, Expression right)`

Method Summary
`VariableExpression` `getVariableExpression()`
`void` `setLeftExpression(Expression leftExpression)`
`Expression` `transformExpression(ExpressionTransformer transformer)` Return a copy of the expression calling the transformer on any nested expressions
`void` `visit(GroovyCodeVisitor visitor)`

Methods inherited from class org.codehaus.groovy.ast.expr.BinaryExpression
`getLeftExpression, getOperation, getRightExpression, getText, newAssignmentExpression, newInitializationExpression, setRightExpression, toString`

Methods inherited from class org.codehaus.groovy.ast.expr.Expression
`getType, setType, transformExpressions`

Methods inherited from class org.codehaus.groovy.ast.ASTNode
`getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setSourcePosition`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### DeclarationExpression

    public DeclarationExpression(VariableExpression left,
                                 Token operation,
                                 Expression right)

Method Detail

### visit

    public void visit(GroovyCodeVisitor visitor)

  Overrides:
    `visit` in class `BinaryExpression`

### getVariableExpression

    public VariableExpression getVariableExpression()

### setLeftExpression

    public void setLeftExpression(Expression leftExpression)

  Overrides:
    `setLeftExpression` in class `BinaryExpression`

### transformExpression

    public Expression transformExpression(ExpressionTransformer transformer)

  Description copied from class: `Expression`
  Return a copy of the expression calling the transformer on any nested expressions

  Overrides:
    `transformExpression` in class `BinaryExpression`

Copyright © 2003-2008 The Codehaus. All rights reserved.