public class AssignmentStatement extends Statement implements ExpressionStatement
This class represents an assignment statement in the storedprocedure language.
It extends the Statement that could part of a Block. This
statement holds references to the variable and it's value which could be an
Expression or a Command.
Statement.LabeledLanguageObject.UtilTYPE_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 |
|---|
AssignmentStatement()
Constructor for AssignmentStatement.
|
AssignmentStatement(ElementSymbol variable,
Command value)
Deprecated.
|
AssignmentStatement(ElementSymbol variable,
Expression value) |
AssignmentStatement(ElementSymbol variable,
QueryCommand 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.
|
Command |
getCommand()
Deprecated.
|
Class<?> |
getExpectedType() |
Expression |
getExpression() |
int |
getType()
Return the type for this statement, this is one of the types
defined on the statement object.
|
ElementSymbol |
getVariable()
Get the expression giving the value that is assigned to the variable.
|
int |
hashCode()
Get hashcode for AssignmentStatement.
|
void |
setCommand(Command command) |
void |
setExpression(Expression expression) |
void |
setVariable(ElementSymbol variable)
Set the variable that is assigned to the value
|
public AssignmentStatement()
public AssignmentStatement(ElementSymbol variable, QueryCommand value)
@Deprecated public AssignmentStatement(ElementSymbol variable, Command value)
public AssignmentStatement(ElementSymbol variable, Expression value)
@Deprecated public Command getCommand()
public void setCommand(Command command)
public Expression getExpression()
getExpression in interface ExpressionStatementpublic void setExpression(Expression expression)
setExpression in interface ExpressionStatementpublic ElementSymbol getVariable()
Expression with the valuepublic void setVariable(ElementSymbol variable)
public int getType()
public void acceptVisitor(LanguageVisitor visitor)
LanguageObjectacceptVisitor in interface LanguageObjectvisitor - Visitor being usedpublic Object clone()
clone in interface LanguageObjectclone in class Statementpublic boolean equals(Object obj)
public int hashCode()
public Class<?> getExpectedType()
getExpectedType in interface ExpressionStatementCopyright © 2018 JBoss by Red Hat. All rights reserved.