use of kalang.core.VarTable in project kalang by kasonyang.
the class InitializationAnalyzer method visitTryStmt.
@Override
public Type visitTryStmt(TryStmt node) {
List<VarTable<LocalVarNode, Void>> assignedList = new ArrayList(node.getCatchStmts().size() + 1);
enterNewFrame();
assignedList.add(assignedVars);
visit(node.getExecStmt());
exitFrame();
for (CatchBlock cs : node.getCatchStmts()) {
enterNewFrame();
assignedList.add(assignedVars);
visit(cs);
exitFrame();
}
addIntersectedAssignedVar(assignedList.toArray(new VarTable[assignedList.size()]));
Statement finallyStmt = node.getFinallyStmt();
if (finallyStmt != null) {
visit(finallyStmt);
}
return null;
}
Aggregations