Overview | Package | Class | Deprecated | Index | Help
| Groovy 1.7.0
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.ast.stmt
Class ReturnStatement

    java.lang.Object
      org.codehaus.groovy.ast.ASTNode
          org.codehaus.groovy.ast.stmt.Statement
              org.codehaus.groovy.ast.stmt.ReturnStatement

    class ReturnStatement
    extends Statement

A return statement

author:
  James Strachan

version:
  $Revision: 15122 $

Field Summary
`static ReturnStatement` | `RETURN_NULL_OR_VOID` Only used for synthetic return statements emitted by the compiler.

Constructor Summary
`ReturnStatement(ExpressionStatement statement)`
`ReturnStatement(Expression expression)`

Method Summary
`Expression` | `getExpression()`
`String` | `getText()`
`boolean` | `isReturningNullOrVoid()`
`void` | `setExpression(Expression expression)`
`void` | `visit(GroovyCodeVisitor visitor)`

Methods inherited from class Statement
getStatementLabel, isEmpty, setStatementLabel

Methods inherited from class ASTNode
getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getText, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setSourcePosition, visit

Methods inherited from class Object
wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll

Field Detail

### RETURN_NULL_OR_VOID

    static final ReturnStatement RETURN_NULL_OR_VOID

  Only used for synthetic return statements emitted by the compiler. For comparisons use isReturningNullOrVoid() instead.

Constructor Detail

### ReturnStatement

    public ReturnStatement(ExpressionStatement statement)

### ReturnStatement

    public ReturnStatement(Expression expression)

Method Detail

### getExpression

    public Expression getExpression()

### getText

    public String getText()

### isReturningNullOrVoid

    public boolean isReturningNullOrVoid()

### setExpression

    public void setExpression(Expression expression)

### visit

    public void visit(GroovyCodeVisitor visitor)

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