public class TryWithResources_c extends Try_c implements TryWithResources
try
-with-resources block.Term.Instance
Modifier and Type | Field and Description |
---|---|
protected java.util.List<LocalDecl> |
resources |
catchBlocks, finallyBlock, tryBlock
exceptions, reachable
Constructor and Description |
---|
TryWithResources_c(Position pos,
java.util.List<LocalDecl> resources,
Block tryBlock,
java.util.List<Catch> catchBlocks,
Block finallyBlock) |
Modifier and Type | Method and Description |
---|---|
<T> java.util.List<T> |
acceptCFG(CFGBuilder<?> v,
java.util.List<T> succs)
Visit this term in evaluation order, calling v.edge() for each successor
in succs, if data flows on that edge.
|
protected void |
assert_(Position pos,
Block tryBlock,
java.util.List<Catch> catchBlocks,
Block finallyBlock) |
Node |
exceptionCheck(ExceptionChecker ec)
Performs exceptionChecking.
|
Term |
firstChild()
Return the first direct subterm performed when evaluating this term.
|
void |
prettyPrint(CodeWriter w,
PrettyPrinter tr)
Pretty-print the AST using the given
CodeWriter . |
protected <N extends TryWithResources_c> |
reconstruct(N n,
java.util.List<LocalDecl> resources,
Block tryBlock,
java.util.List<Catch> catchBlocks,
Block finallyBlock)
Reconstruct the statement.
|
java.util.List<LocalDecl> |
resources() |
TryWithResources |
resources(java.util.List<LocalDecl> resources) |
protected <N extends TryWithResources_c> |
resources(N n,
java.util.List<LocalDecl> resources) |
java.lang.String |
toString() |
Node |
visitChildren(NodeVisitor v)
Visit the children of the node.
|
catchBlocks, catchBlocks, catchBlocks, constructTryBlockExceptionChecker, copy, exceptionCheckCatchBlocks, exceptionCheckEnter, exceptionCheckFinallyBlock, exceptionCheckTryBlock, finallyBlock, finallyBlock, finallyBlock, reconstruct, tryBlock, tryBlock, tryBlock
exceptions, exceptions, exceptions, extRewrite, listChild, reachable, reachable, reachable
addDecls, buildTypes, buildTypesEnter, checkConstants, childExpectedType, copy, copy, copyIfNeeded, del, del, disambiguate, disambiguateEnter, disambiguateOverride, dump, dump, dump, dump, dump, enterChildScope, enterScope, error, error, error, ext, ext, ext, ext, extRewriteEnter, isDisambiguated, isTypeChecked, lang, position, position, position, prettyPrint, prettyPrint, prettyPrint, prettyPrint, print, printBlock, printSubStmt, throwTypes, translate, typeCheck, typeCheckEnter, typeCheckOverride, visit, visitChild, visitEdge, visitList
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
catchBlocks, catchBlocks, finallyBlock, finallyBlock, tryBlock, tryBlock
exceptions, exceptions, reachable, reachable
del, del, dump, error, error, ext, ext, ext, ext, isDisambiguated, isTypeChecked, position, position, visit, visitEdge
addDecls, buildTypes, buildTypesEnter, checkConstants, childExpectedType, copy, copy, disambiguate, disambiguateEnter, disambiguateOverride, dump, dump, dump, dump, enterChildScope, enterScope, exceptionCheckEnter, extRewrite, extRewriteEnter, lang, prettyPrint, prettyPrint, prettyPrint, prettyPrint, throwTypes, translate, typeCheck, typeCheckEnter, typeCheckOverride, visitChild, visitList
protected java.util.List<LocalDecl> resources
protected void assert_(Position pos, Block tryBlock, java.util.List<Catch> catchBlocks, Block finallyBlock)
public java.util.List<LocalDecl> resources()
resources
in interface TryWithResources
public TryWithResources resources(java.util.List<LocalDecl> resources)
resources
in interface TryWithResources
protected <N extends TryWithResources_c> N resources(N n, java.util.List<LocalDecl> resources)
protected <N extends TryWithResources_c> N reconstruct(N n, java.util.List<LocalDecl> resources, Block tryBlock, java.util.List<Catch> catchBlocks, Block finallyBlock)
public Node visitChildren(NodeVisitor v)
NodeOps
visitChildren
in interface NodeOps
visitChildren
in class Try_c
v
- The visitor that will traverse/rewrite the AST.this
.public Node exceptionCheck(ExceptionChecker ec) throws SemanticException
Try_c
exceptionCheck
in interface NodeOps
exceptionCheck
in class Try_c
ec
- The ExceptionChecker that was run against the
child node. It contains the exceptions that can be thrown by the try
block.SemanticException
public void prettyPrint(CodeWriter w, PrettyPrinter tr)
Node_c
CodeWriter
.prettyPrint
in interface NodeOps
prettyPrint
in class Try_c
w
- The code writer to which to write.tr
- The pretty printer. This is not a visitor.public Term firstChild()
TermOps
firstChild
in interface TermOps
firstChild
in class Try_c
public <T> java.util.List<T> acceptCFG(CFGBuilder<?> v, java.util.List<T> succs)
TermOps