public class ReturnStatement extends Statement
| Constructor and Description |
|---|
ReturnStatement()
Creates a "return nothing" statement.
|
ReturnStatement(Expression expr)
Creates a statement that returns an expression.
|
| Modifier and Type | Method and Description |
|---|---|
ReturnStatement |
clone()
Returns a clone of the return statement.
|
static void |
defaultPrint(ReturnStatement s,
java.io.PrintWriter o)
Prints a break statement to a stream.
|
Expression |
getExpression()
Returns the expression that is being returned by this statement,
or null if nothing is being returned.
|
static void |
setClassPrintMethod(java.lang.reflect.Method m)
Overrides the class print method, so that all subsequently
created objects will use the supplied method.
|
void |
setExpression(Expression e)
Sets the child expression as the given expression
e. |
annotate, annotateAfter, annotateBefore, containsAnnotation, detach, equals, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getChildren, getParent, getProcedure, hashCode, print, removeAnnotations, removeAnnotations, removeChild, setChild, setLineNumber, setParent, setPrintMethod, swapWith, toString, verify, wherepublic ReturnStatement()
public ReturnStatement(Expression expr)
expr - The expression to return.java.lang.IllegalArgumentException - if expr is null.NotAnOrphanException - if expr has a parent.public static void defaultPrint(ReturnStatement s, java.io.PrintWriter o)
s - The statement to print.o - The writer on which to print the statement.public Expression getExpression()
public void setExpression(Expression e)
e.e - the expression to be used as a child.public static void setClassPrintMethod(java.lang.reflect.Method m)
m - The new print method.public ReturnStatement clone()