polyglot.ast
Interface Try

All Superinterfaces:
java.lang.Cloneable, CompoundStmt, Copy, JL, Node, NodeOps, Stmt, Term
All Known Implementing Classes:
Try_c

public interface Try
extends CompoundStmt

An immutable representation of a try block, one or more catch blocks, and an optional finally block.


Method Summary
 java.util.List catchBlocks()
          List of catch blocks.
 Try catchBlocks(java.util.List catchBlocks)
          Set the list of catch blocks.
 Block finallyBlock()
          The block to "finally" execute.
 Try finallyBlock(Block finallyBlock)
          Set the block to "finally" execute.
 Block tryBlock()
          The block to "try".
 Try tryBlock(Block tryBlock)
          Set the block to "try".
 
Methods inherited from interface polyglot.ast.Term
acceptCFG, entry, exceptions, exceptions, reachable, reachable
 
Methods inherited from interface polyglot.ast.Node
childExpectedType, del, del, dump, ext, ext, ext, ext, position, position, visit, visitChild, visitEdge, visitList
 
Methods inherited from interface polyglot.ast.JL
init, node
 
Methods inherited from interface polyglot.ast.NodeOps
addDecls, addMembers, addMembersEnter, buildTypes, buildTypesEnter, disambiguate, disambiguateEnter, enterScope, enterScope, exceptionCheck, exceptionCheckEnter, prettyPrint, throwTypes, translate, typeCheck, typeCheckEnter, visitChildren
 
Methods inherited from interface polyglot.util.Copy
copy
 

Method Detail

tryBlock

Block tryBlock()
The block to "try".


tryBlock

Try tryBlock(Block tryBlock)
Set the block to "try".


catchBlocks

java.util.List catchBlocks()
List of catch blocks.

Returns:
A list of Catch.

catchBlocks

Try catchBlocks(java.util.List catchBlocks)
Set the list of catch blocks.

Parameters:
catchBlocks - A list of Catch.

finallyBlock

Block finallyBlock()
The block to "finally" execute.


finallyBlock

Try finallyBlock(Block finallyBlock)
Set the block to "finally" execute.