Package org.teiid.query.sql.proc
Class ReturnStatement
- java.lang.Object
-
- org.teiid.query.sql.proc.Statement
-
- org.teiid.query.sql.proc.AssignmentStatement
-
- org.teiid.query.sql.proc.ReturnStatement
-
- All Implemented Interfaces:
Cloneable
,LanguageObject
,ExpressionStatement
public class ReturnStatement extends AssignmentStatement
This class represents a return statement
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.teiid.query.sql.proc.Statement
Statement.Labeled
-
Nested classes/interfaces inherited from interface org.teiid.query.sql.LanguageObject
LanguageObject.Util
-
-
Field Summary
-
Fields inherited from class org.teiid.query.sql.proc.Statement
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 Summary
Constructors Constructor Description ReturnStatement(Expression value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.-
Methods inherited from class org.teiid.query.sql.proc.AssignmentStatement
getCommand, getExpectedType, getExpression, getVariable, hashCode, setCommand, setExpression, setVariable
-
-
-
-
Constructor Detail
-
ReturnStatement
public ReturnStatement(Expression value)
-
-
Method Detail
-
getType
public int getType()
Return the type for this statement, this is one of the types defined on the statement object.- Overrides:
getType
in classAssignmentStatement
- Returns:
- The type of this statement
-
acceptVisitor
public void acceptVisitor(LanguageVisitor visitor)
Description copied from interface:LanguageObject
Method for accepting a visitor. It is the responsibility of the language object to call back on the visitor.- Specified by:
acceptVisitor
in interfaceLanguageObject
- Overrides:
acceptVisitor
in classAssignmentStatement
- Parameters:
visitor
- Visitor being used
-
clone
public Object clone()
Deep clone statement to produce a new identical statement.- Specified by:
clone
in interfaceLanguageObject
- Overrides:
clone
in classAssignmentStatement
- Returns:
- Deep clone
-
equals
public boolean equals(Object obj)
Description copied from class:AssignmentStatement
Compare two AssignmentStatements for equality. They will only evaluate to equal if they are IDENTICAL: variable and its value which could be a command or an expression objects are equal.- Overrides:
equals
in classAssignmentStatement
- Parameters:
obj
- Other object- Returns:
- True if equal
-
-