Package org.qdl_lang.statements
Class TryCatch
- java.lang.Object
-
- org.qdl_lang.statements.TryCatch
-
- All Implemented Interfaces:
Serializable
,Statement
public class TryCatch extends Object implements Statement
Created by Jeff Gaynor
on 1/22/20 at 10:36 AM- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
ERROR_CODE_NAME
static String
ERROR_MESSAGE_NAME
static String
ERROR_STATE_NAME
static Long
RESERVED_ASSERTION_CODE
static Long
RESERVED_SYSTEM_ERROR_CODE
static Long
RESERVED_USER_ERROR_CODE
-
Constructor Summary
Constructors Constructor Description TryCatch()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
evaluate(State state)
List<Statement>
getCatchStatements()
List<String>
getSourceCode()
TokenPosition
getTokenPosition()
List<Statement>
getTryStatements()
boolean
hasTokenPosition()
void
setCatchStatements(List<Statement> catchStatements)
void
setSourceCode(List<String> sourceCode)
void
setTokenPosition(TokenPosition tokenPosition)
Set the location of this token from the parser.void
setTryStatements(List<Statement> tryStatements)
-
-
-
Field Detail
-
RESERVED_SYSTEM_ERROR_CODE
public static final Long RESERVED_SYSTEM_ERROR_CODE
-
RESERVED_ASSERTION_CODE
public static final Long RESERVED_ASSERTION_CODE
-
RESERVED_USER_ERROR_CODE
public static final Long RESERVED_USER_ERROR_CODE
-
ERROR_CODE_NAME
public static final String ERROR_CODE_NAME
- See Also:
- Constant Field Values
-
ERROR_MESSAGE_NAME
public static final String ERROR_MESSAGE_NAME
- See Also:
- Constant Field Values
-
ERROR_STATE_NAME
public static final String ERROR_STATE_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
setTokenPosition
public void setTokenPosition(TokenPosition tokenPosition)
Description copied from interface:Statement
Set the location of this token from the parser. This is used for error notifications later.- Specified by:
setTokenPosition
in interfaceStatement
-
getTokenPosition
public TokenPosition getTokenPosition()
- Specified by:
getTokenPosition
in interfaceStatement
-
hasTokenPosition
public boolean hasTokenPosition()
- Specified by:
hasTokenPosition
in interfaceStatement
-
getSourceCode
public List<String> getSourceCode()
- Specified by:
getSourceCode
in interfaceStatement
-
setSourceCode
public void setSourceCode(List<String> sourceCode)
- Specified by:
setSourceCode
in interfaceStatement
-
-