@Override public Node visit(CatchClause _n, Object _arg) { MultiTypeParameter except = cloneNodes(_n.getExcept(), _arg); BlockStmt catchBlock = cloneNodes(_n.getCatchBlock(), _arg); Comment comment = cloneNodes(_n.getComment(), _arg); CatchClause r = new CatchClause( _n.getBeginLine(), _n.getBeginColumn(), _n.getEndLine(), _n.getEndColumn(), except.getModifiers(), except.getAnnotations(), except.getTypes(), except.getId(), catchBlock ); r.setComment(comment); return r; }
public void setCatchBlock(final BlockStmt catchBlock) { this.catchBlock = catchBlock; setAsParentNodeOf(this.catchBlock); }
@Override public Node visit(final CatchClause n, final A arg) { n.setExcept((MultiTypeParameter) n.getExcept().accept(this, arg)); n.setCatchBlock((BlockStmt) n.getCatchBlock().accept(this, arg)); return n; }
@Override public Boolean visit(final CatchClause n1, final Node arg) { final CatchClause n2 = (CatchClause) arg; if (!nodeEquals(n1.getExcept(), n2.getExcept())) { return Boolean.FALSE; } if (!nodeEquals(n1.getCatchBlock(), n2.getCatchBlock())) { return Boolean.FALSE; } return Boolean.TRUE; }
@Override public void visit(final CatchClause n, final A arg) { visitComment(n.getComment(), arg); n.getExcept().accept(this, arg); n.getCatchBlock().accept(this, arg); }
@Override public Node visit(final TryStmt n, final A arg) { n.setTryBlock((BlockStmt) n.getTryBlock().accept(this, arg)); final List<CatchClause> catchs = n.getCatchs(); if (catchs != null) { for (int i = 0; i < catchs.size(); i++) { catchs.set(i, (CatchClause) catchs.get(i).accept(this, arg)); } removeNulls(catchs); } if (n.getFinallyBlock() != null) { n.setFinallyBlock((BlockStmt) n.getFinallyBlock().accept(this, arg)); } return n; }
jj_consume_token(RPAREN); catchBlock = Block(); catchs = add(catchs, new CatchClause(cLine, cColumn, token.endLine, token.endColumn, exceptModifier.modifiers, exceptModifier.annotations, exceptTypes, exceptId, catchBlock)); exceptTypes = new LinkedList();
@Override public void visit(final CatchClause n, final Object arg) { printJavaComment(n.getComment(), arg); printer.print(" catch ("); n.getExcept().accept(this, arg); printer.print(") "); n.getCatchBlock().accept(this, arg); }
@Override public R visit(final CatchClause n, final A arg) { { R result = n.getExcept().accept(this, arg); if (result != null) { return result; } } { R result = n.getCatchBlock().accept(this, arg); if (result != null) { return result; } } return null; }
@Override public void visit(final TryStmt n, final A arg) { visitComment(n.getComment(), arg); n.getTryBlock().accept(this, arg); if (n.getCatchs() != null) { for (final CatchClause c : n.getCatchs()) { c.accept(this, arg); } } if (n.getFinallyBlock() != null) { n.getFinallyBlock().accept(this, arg); } }
jj_consume_token(RPAREN); catchBlock = Block(); catchs = add(catchs, new CatchClause(cLine, cColumn, token.endLine, token.endColumn, except, catchBlock)); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case CATCH:
public void visit(CatchClause n, Object arg) { printer.print(" catch ("); n.getExcept().accept(this, arg); printer.print(") "); n.getCatchBlock().accept(this, arg); }
if (n.getCatchs() != null) { for (final CatchClause c : n.getCatchs()) { c.accept(this, arg);
public void setExcept(final MultiTypeParameter except) { this.except = except; setAsParentNodeOf(this.except); } }
public void visit(TryStmt n, Object arg) { printer.print("try "); n.getTryBlock().accept(this, arg); if (n.getCatchs() != null) { for (CatchClause c : n.getCatchs()) { c.accept(this, arg); } } if (n.getFinallyBlock() != null) { printer.print(" finally "); n.getFinallyBlock().accept(this, arg); } }
@Override public R visit(final TryStmt n, final A arg) { { R result = n.getTryBlock().accept(this, arg); if (result != null) { return result; } } if (n.getCatchs() != null) { for (final CatchClause c : n.getCatchs()) { { R result = c.accept(this, arg); if (result != null) { return result; } } } } if (n.getFinallyBlock() != null) { { R result = n.getFinallyBlock().accept(this, arg); if (result != null) { return result; } } } return null; }