Groovy 2.2.1

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()

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