public class ReturnStatement extends AssignmentStatement
This class represents a return statement
Statement.Labeled
LanguageObject.Util
TYPE_ASSIGNMENT, TYPE_BREAK, TYPE_COMMAND, TYPE_COMPOUND, TYPE_CONTINUE, TYPE_DECLARE, TYPE_ERROR, TYPE_IF, TYPE_LEAVE, TYPE_LOOP, TYPE_RETURN, TYPE_UNKNOWN, TYPE_UPDATE, TYPE_WHILE
Constructor and Description |
---|
ReturnStatement(Expression value) |
Modifier and Type | Method and Description |
---|---|
void |
acceptVisitor(LanguageVisitor visitor)
Method for accepting a visitor.
|
Object |
clone()
Deep clone statement to produce a new identical statement.
|
boolean |
equals(Object obj)
Compare two AssignmentStatements for equality.
|
int |
getType()
Return the type for this statement, this is one of the types
defined on the statement object.
|
getCommand, getExpectedType, getExpression, getVariable, hashCode, setCommand, setExpression, setVariable
public ReturnStatement(Expression value)
public int getType()
getType
in class AssignmentStatement
public void acceptVisitor(LanguageVisitor visitor)
LanguageObject
acceptVisitor
in interface LanguageObject
acceptVisitor
in class AssignmentStatement
visitor
- Visitor being usedpublic Object clone()
clone
in interface LanguageObject
clone
in class AssignmentStatement
public boolean equals(Object obj)
AssignmentStatement
equals
in class AssignmentStatement
obj
- Other objectCopyright © 2019. All rights reserved.