| Constructor and Description |
|---|
TryNode(int lineNumber,
long token,
int finish,
Block body,
List<Block> catchBlocks,
Block finallyBody)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
Node |
accept(NodeVisitor<? extends LexicalContext> visitor)
Assist in IR navigation.
|
<R> R |
accept(TranslatorNodeVisitor<? extends LexicalContext,R> visitor)
Provides a means to navigate the IR.
|
Block |
getBody()
Get the body for this try block
|
List<Block> |
getCatchBlocks()
Get the catch blocks for this try block
|
List<CatchNode> |
getCatches()
Get the catches for this try block
|
Symbol |
getException()
Get the exception symbol for this try block
|
Block |
getFinallyBody()
Get the body of the finally clause for this try
|
boolean |
isCompletionValueNeverEmpty() |
boolean |
isTerminal()
Is this a terminal statement, i.e.
|
TryNode |
setBody(Block body)
Reset the body of this try block
|
TryNode |
setCatchBlocks(List<Block> catchBlocks)
Set the catch blocks of this try
|
TryNode |
setFinallyBody(Block finallyBody)
Set the finally body of this try
|
void |
toString(StringBuilder sb,
boolean printType)
Print logic that decides whether to show the optimistic type or not - for example it should
not be printed after just parse, when it hasn't been computed, or has been set to a trivially
provable value
|
getLineNumber, hasGoto, hasTerminalFlagsclone, equals, getFinish, getSourceOrder, getStart, getToken, hashCode, isAssignment, isLoop, isTokenType, tokenType, toString, toStringpublic TryNode(int lineNumber,
long token,
int finish,
Block body,
List<Block> catchBlocks,
Block finallyBody)
lineNumber - lineNumbertoken - tokenfinish - finishbody - try node bodycatchBlocks - list of catch blocks in orderfinallyBody - body of finally block or null if nonepublic boolean isTerminal()
StatementisTerminal in interface TerminalisTerminal in class Statementpublic Node accept(NodeVisitor<? extends LexicalContext> visitor)
public <R> R accept(TranslatorNodeVisitor<? extends LexicalContext,R> visitor)
Nodepublic void toString(StringBuilder sb, boolean printType)
Nodepublic Block getBody()
public TryNode setBody(Block body)
body - new bodypublic List<CatchNode> getCatches()
public List<Block> getCatchBlocks()
public TryNode setCatchBlocks(List<Block> catchBlocks)
catchBlocks - list of catch blockspublic Symbol getException()
public Block getFinallyBody()
public TryNode setFinallyBody(Block finallyBody)
finallyBody - new finally bodypublic boolean isCompletionValueNeverEmpty()
isCompletionValueNeverEmpty in class Statementempty