public class RaiseStatement extends Statement implements ExpressionStatement
This class represents a error assignment statement in the storedprocedure language.
It extends the Statement
that could part of a Block
. This
this object holds and error message.
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 |
---|
RaiseStatement() |
RaiseStatement(Expression message)
Constructor for RaiseErrorStatement.
|
RaiseStatement(Expression message,
boolean warning) |
Modifier and Type | Method and Description |
---|---|
void |
acceptVisitor(LanguageVisitor visitor)
Method for accepting a visitor.
|
RaiseStatement |
clone()
Deep clone statement to produce a new identical statement.
|
boolean |
equals(Object obj) |
Class<?> |
getExpectedType() |
Expression |
getExpression() |
int |
getType()
Return type of statement to make it easier to build switch statements by statement type.
|
int |
hashCode() |
boolean |
isWarning() |
void |
setExpression(Expression expression) |
void |
setWarning(boolean warning) |
public RaiseStatement()
public RaiseStatement(Expression message)
message
- The error messagepublic RaiseStatement(Expression message, boolean warning)
public void acceptVisitor(LanguageVisitor visitor)
LanguageObject
acceptVisitor
in interface LanguageObject
visitor
- Visitor being usedpublic Expression getExpression()
getExpression
in interface ExpressionStatement
public void setExpression(Expression expression)
setExpression
in interface ExpressionStatement
public int getType()
Statement
public RaiseStatement clone()
Statement
clone
in interface LanguageObject
clone
in class Statement
public Class<?> getExpectedType()
getExpectedType
in interface ExpressionStatement
public boolean isWarning()
public void setWarning(boolean warning)
Copyright © 2019. All rights reserved.