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

## org.codehaus.groovy.ast.stmt
[Java] Class ReturnStatement

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

    public class ReturnStatement
    extends Statement

A return statement

Authors:
  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
copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getNodeMetaData, getText, removeNodeMetaData, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setNodeMetaData, setSourcePosition, visit

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

Field Detail

### RETURN_NULL_OR_VOID

    public 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-2010 The Codehaus. All rights reserved.