Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| 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\$

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()`
`java.lang.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, putNodeMetaData, removeNodeMetaData, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setNodeMetaData, setSourcePosition, visit

Methods inherited from class java.lang.Object
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#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 java.lang.String getText()

### isReturningNullOrVoid

    public boolean isReturningNullOrVoid()

### setExpression

    public void setExpression(Expression expression)

### visit

    public void visit(GroovyCodeVisitor visitor)

Groovy Documentation