for (int i = 0; i < numOfCatchClauses; i++) {
CatchClause catchClause = catchClauses.get(i);
if (catchClause.getOnKeyword() != null) {
// on-catch clause found, verify that the exception type is not a subtype of a previous
// on-catch exception type
TypeName typeName = catchClause.getExceptionType();
if (typeName != null && typeName.getType() != null) {
Type currentType = typeName.getType();
if (currentType.isObject()) {
// Found catch clause clause that has Object as an exception type, this is equivalent to
// having a catch clause that doesn't have an exception type, visit the block, but
// generate an error on any following catch clauses (and don't visit them).
safelyVisit(catchClause);