AST
node type TryStmt

General Info

Production
TryStmt : Stmt ::= Block CatchClause* [Finally:Block];
Type Hierarchy:
java.lang.Object
  extended by beaver.Symbol
      extended by AST.ASTNode<ASTNode>
          extended by AST.Stmt
              extended by AST.TryStmt
All Implemented Interfaces:
FinallyHost, java.lang.Cloneable, java.lang.Iterable<ASTNode>
Direct Known Subclasses:
TryWithResources

Description

Source
Declared in Java1.4Frontend/java.ast at line 219

Member Filters

API level:

Aspect:

Constructors

public TryStmt()
 
public TryStmt(Block p0,
               List<CatchClause> p1,
               Opt<Block> p2)
 

Attributes

syn java.util.Collection branches()
Source
Declared in Java1.4Frontend/BranchTarget.jrag at line 115
Aspect
BranchTarget
syn java.util.Collection branchesFromFinally()
Source
Declared in Java1.4Frontend/BranchTarget.jrag at line 123
Aspect
BranchTarget
syn java.util.Collection targetBranches()
Source
Declared in Java1.4Frontend/BranchTarget.jrag at line 131
Aspect
BranchTarget
syn java.util.Collection escapedBranches()
Source
Declared in Java1.4Frontend/BranchTarget.jrag at line 139
Aspect
BranchTarget
syn boolean isDAafter(Variable v)
Overrides:isDAafter in class Stmt
Source
Declared in Java1.4Frontend/DefiniteAssignment.jrag at line 666
Aspect
DA
syn boolean isDUafterFinally(Variable v)
Specified by:isDUafterFinally in interface FinallyHost
Source
Declared in Java1.4Frontend/DefiniteAssignment.jrag at line 914
Aspect
DU
syn boolean isDAafterFinally(Variable v)
Specified by:isDAafterFinally in interface FinallyHost
Source
Declared in Java1.4Frontend/DefiniteAssignment.jrag at line 917
Aspect
DU
syn boolean isDUbefore(Variable v)
Overrides:isDUbefore in class Stmt
Source
Declared in Java1.4Frontend/DefiniteAssignment.jrag at line 1185
Aspect
DU
syn boolean isDUafter(Variable v)
Overrides:isDUafter in class Stmt
Source
Declared in Java1.4Frontend/DefiniteAssignment.jrag at line 1221
Aspect
DU
syn boolean catchableException(TypeDecl type)
The block of the try statement can throw an exception of a type assignable to the given type.
Source
Declared in Java1.4Frontend/ExceptionHandling.jrag at line 221
Aspect
ExceptionHandling
syn boolean canCompleteNormally()
Overrides:canCompleteNormally in class Stmt
Source
Declared in Java1.4Frontend/UnreachableStatements.jrag at line 113
Aspect
UnreachableStatements
syn int break_label()
Overrides:break_label in class Stmt
Source
Declared in Java1.4Backend/CreateBCode.jrag at line 1398
Aspect
CreateBCode
syn int continue_label()
Overrides:continue_label in class Stmt
Source
Declared in Java1.4Backend/CreateBCode.jrag at line 1417
Aspect
CreateBCode
syn int label_begin()
Source
Declared in Java1.4Backend/CreateBCode.jrag at line 1476
Aspect
CreateBCode
syn int label_block_end()
Source
Declared in Java1.4Backend/CreateBCode.jrag at line 1477
Aspect
CreateBCode
syn int label_end()
Source
Declared in Java1.4Backend/CreateBCode.jrag at line 1478
Aspect
CreateBCode
syn int label_finally()
Source
Declared in Java1.4Backend/CreateBCode.jrag at line 1479
Aspect
CreateBCode
Specified by:label_finally_block in interface FinallyHost
Source
Declared in Java1.4Backend/CreateBCode.jrag at line 1480
Aspect
CreateBCode
Source
Declared in Java1.4Backend/CreateBCode.jrag at line 1481
Aspect
CreateBCode
syn int label_catch_end()
Source
Declared in Java1.4Backend/CreateBCode.jrag at line 1482
Aspect
CreateBCode
syn boolean modifiedInScope(Variable var)
Specified by:modifiedInScope in class Stmt
Source
Declared in Java7Frontend/PreciseRethrow.jrag at line 55
Aspect
PreciseRethrow
inh boolean handlesException(TypeDecl exceptionType)
Source
Declared in Java1.4Frontend/ExceptionHandling.jrag at line 49
Aspect
ExceptionHandling
Source
Declared in Java1.4Frontend/UnreachableStatements.jrag at line 138
Aspect
UnreachableStatements
Source
Declared in Java1.4Frontend/UnreachableStatements.jrag at line 139
Aspect
UnreachableStatements
Source
Declared in Java1.4Backend/CodeGeneration.jrag at line 793
Aspect
CodeGeneration

Methods

public void flushCache()
Overrides:flushCache in class Stmt
public void flushCollectionCache()
Overrides:flushCollectionCache in class Stmt
public TryStmt clone()
              throws java.lang.CloneNotSupportedException
Overrides:clone in class Stmt
Throws:
java.lang.CloneNotSupportedException
public TryStmt copy()
Overrides:copy in class ASTNode<ASTNode>
public TryStmt fullCopy()
Create a deep copy of the AST subtree at this node. The copy is dangling, i.e. has no parent.
Overrides:fullCopy in class ASTNode<ASTNode>
Returns:
dangling copy of the subtree at this node
public void collectBranches(java.util.Collection c)
Overrides:collectBranches in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/BranchTarget.jrag at line 60
Aspect
BranchTarget
public Stmt branchTarget(Stmt branchStmt)
Overrides:branchTarget in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/BranchTarget.jrag at line 161
Aspect
BranchTarget
public void collectFinally(Stmt branchStmt,
                           java.util.ArrayList list)
Overrides:collectFinally in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/BranchTarget.jrag at line 199
Aspect
BranchTarget
protected boolean reachedException(TypeDecl type)
Overrides:reachedException in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/ExceptionHandling.jrag at line 231
Aspect
ExceptionHandling
public void toString(java.lang.StringBuffer s)
Overrides:toString in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/PrettyPrint.jadd at line 707
Aspect
PrettyPrint
Source
Declared in Java1.4Backend/CodeGeneration.jrag at line 795
Aspect
CodeGeneration
Source
Declared in Java1.4Backend/CodeGeneration.jrag at line 805
Aspect
CodeGeneration
public void createBCode(CodeGeneration gen)
Overrides:createBCode in class Stmt
Source
Declared in Java1.4Backend/CreateBCode.jrag at line 1484
Aspect
CreateBCode
public void init$Children()
Initializes the child array to the correct size. Initializes List and Opt nta children.
Overrides:init$Children in class Stmt
protected int numChildren()
Overrides:numChildren in class Stmt
public boolean mayHaveRewrite()
Overrides:mayHaveRewrite in class Stmt
public void setBlock(Block node)
Replaces the Block child.
Parameters:
node - The new node to replace the Block child.
public Block getBlock()
Retrieves the Block child.
Returns:
The current node used as the Block child.
Retrieves the Block child.

This method does not invoke AST transformations.

Returns:
The current node used as the Block child.
public void setCatchClauseList(List<CatchClause> list)
Replaces the CatchClause list.
Parameters:
list - The new list node to be used as the CatchClause list.
public int getNumCatchClause()
Retrieves the number of children in the CatchClause list.
Returns:
Number of children in the CatchClause list.
Retrieves the number of children in the CatchClause list. Calling this method will not trigger rewrites..
Returns:
Number of children in the CatchClause list.
Retrieves the element at index i in the CatchClause list..
Parameters:
i - Index of the element to return.
Returns:
The element at position i in the CatchClause list.
public void addCatchClause(CatchClause node)
Append an element to the CatchClause list.
Parameters:
node - The element to append to the CatchClause list.
public void setCatchClause(CatchClause node,
                           int i)
Replaces the CatchClause list element at index i with the new node node.
Parameters:
node - The new node to replace the old list element.
i - The list index of the node to be replaced.
Retrieves the CatchClause list.
Returns:
The node representing the CatchClause list.
Retrieves the CatchClause list.

This method does not invoke AST transformations.

Returns:
The node representing the CatchClause list.
Retrieves the CatchClause list.
Returns:
The node representing the CatchClause list.
Retrieves the CatchClause list.

This method does not invoke AST transformations.

Returns:
The node representing the CatchClause list.
public void setFinallyOpt(Opt<Block> opt)
Replaces the optional node for the Finally child. This is the Opt node containing the child Finally, not the actual child!
Parameters:
opt - The new node to be used as the optional node for the Finally child.
public boolean hasFinally()
Check whether the optional Finally child exists.
Returns:
true if the optional Finally child exists, false if it does not.
public Block getFinally()
Retrieves the (optional) Finally child.
Returns:
The Finally child, if it exists. Returns null otherwise.
public void setFinally(Block node)
Replaces the (optional) Finally child.
Parameters:
node - The new node to be used as the Finally child.
Retrieves the optional node for child Finally. This is the Opt node containing the child Finally, not the actual child!

This method does not invoke AST transformations.

Returns:
The optional node for child Finally.
public boolean Define_boolean_isDAbefore(ASTNode caller,
                                         ASTNode child,
                                         Variable v)
Overrides:Define_boolean_isDAbefore in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/DefiniteAssignment.jrag at line 665
public boolean Define_boolean_isDUbefore(ASTNode caller,
                                         ASTNode child,
                                         Variable v)
Overrides:Define_boolean_isDUbefore in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/DefiniteAssignment.jrag at line 1212
public boolean Define_boolean_handlesException(ASTNode caller,
                                               ASTNode child,
                                               TypeDecl exceptionType)
Overrides:Define_boolean_handlesException in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/ExceptionHandling.jrag at line 202
public boolean Define_boolean_reachable(ASTNode caller,
                                        ASTNode child)
Overrides:Define_boolean_reachable in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/UnreachableStatements.jrag at line 121
public boolean Define_boolean_reachableCatchClause(ASTNode caller,
                                                   ASTNode child,
                                                   TypeDecl exceptionType)
Overrides:Define_boolean_reachableCatchClause in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/UnreachableStatements.jrag at line 128
public boolean Define_boolean_reportUnreachable(ASTNode caller,
                                                ASTNode child)
Overrides:Define_boolean_reportUnreachable in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/UnreachableStatements.jrag at line 156
public int Define_int_localNum(ASTNode caller,
                               ASTNode child)
Overrides:Define_int_localNum in class ASTNode<ASTNode>
Source
Declared in Java1.4Backend/LocalNum.jrag at line 118
public java.util.Collection<TypeDecl> Define_Collection_TypeDecl__caughtExceptions(ASTNode caller,
                                                                                   ASTNode child)
Overrides:Define_Collection_TypeDecl__caughtExceptions in class ASTNode<ASTNode>
Source
Declared in Java7Frontend/PreciseRethrow.jrag at line 138
Overrides:rewriteTo in class Stmt

Fields

protected boolean branches_computed
protected java.util.Collection branches_value
protected java.util.Collection branchesFromFinally_value
protected boolean targetBranches_computed
protected java.util.Collection targetBranches_value
protected boolean escapedBranches_computed
protected java.util.Collection escapedBranches_value
protected java.util.Map isDAafter_Variable_values
protected java.util.Map isDUbefore_Variable_values
protected java.util.Map isDUafter_Variable_values
protected java.util.Map catchableException_TypeDecl_values
protected boolean canCompleteNormally_value
protected boolean label_begin_computed
protected int label_begin_value
protected boolean label_block_end_computed
protected int label_block_end_value
protected boolean label_end_computed
protected int label_end_value
protected boolean label_finally_computed
protected int label_finally_value
protected boolean label_catch_end_computed
protected int label_catch_end_value
protected java.util.Map handlesException_TypeDecl_values
protected boolean typeError_computed

Inherited Members

Attributes inherited from AST.Stmt

Attributes inherited from AST.ASTNode

Methods inherited from class AST.Stmt

Methods inherited from class AST.ASTNode

Methods inherited from class beaver.Symbol

getColumn
getEnd
getId
getLine
getStart
makePosition

Methods inherited from class java.lang.Object

equals
finalize
getClass
hashCode
notify
notifyAll
wait
wait
wait

Methods inherited from interface AST.FinallyHost

Fields inherited from AST.Stmt

Fields inherited from AST.ASTNode

Fields inherited from beaver.Symbol

end
id
start
value