All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class openjava.ptree.ReturnStatement

java.lang.Object
   |
   +----openjava.ptree.PtreeObject
           |
           +----openjava.ptree.NonLeaf
                   |
                   +----openjava.ptree.ReturnStatement

public class ReturnStatement
extends NonLeaf
implements Statement, Ptree
The ReturnStatement class represents a return statement node of parse tree.

See Also:
Ptree, NonLeaf, Statement

Constructor Index

 o ReturnStatement()
Allocates a new object.
 o ReturnStatement(Expression)
Allocates a new object.

Method Index

 o getExpression()
Gets the returned expression by this statement.
 o setExpression(Expression)
Sets the returned expression by this statement.
 o writeCode()
Writes the code this parse-tree presents for.

Constructors

 o ReturnStatement
 public ReturnStatement(Expression expr)
Allocates a new object.

Parameters:
expr - the expression to be returned by this statement. If this is null, nothing to be returned.
 o ReturnStatement
 public ReturnStatement()
Allocates a new object.

Methods

 o writeCode
 public void writeCode()
Writes the code this parse-tree presents for.

Overrides:
writeCode in class NonLeaf
 o getExpression
 public Expression getExpression()
Gets the returned expression by this statement.

Returns:
the expression to be returned by this statement.
 o setExpression
 public void setExpression(Expression expr)
Sets the returned expression by this statement.

Parameters:
expr - the expression to be returned by this statement.

All Packages  Class Hierarchy  This Package  Previous  Next  Index