@Override public Node visit(MultiTypeParameter _n, Object _arg) { List<AnnotationExpr> annotations = visit(_n.getAnnotations(), _arg); List<Type> types = visit(_n.getTypes(), _arg); VariableDeclaratorId id = cloneNodes(_n.getId(), _arg); Comment comment = cloneNodes(_n.getComment(), _arg); MultiTypeParameter r = new MultiTypeParameter( _n.getBeginLine(), _n.getBeginColumn(), _n.getEndLine(), _n.getEndColumn(), _n.getModifiers(), annotations, types, id ); r.setComment(comment); return r; }
@Override public void visit(final MultiTypeParameter n, final A arg) { visitComment(n.getComment(), arg); if (n.getAnnotations() != null) { for (final AnnotationExpr a : n.getAnnotations()) { a.accept(this, arg); } } for (final Type type : n.getTypes()) { type.accept(this, arg); } n.getId().accept(this, arg); }
@Override public R visit(final MultiTypeParameter n, final A arg) { if (n.getAnnotations() != null) { for (final AnnotationExpr a : n.getAnnotations()) { { R result = a.accept(this, arg); if (result != null) { return result; } } } } { for (final Type type : n.getTypes()) { R result = type.accept(this, arg); if (result != null) { return result; } } } { R result = n.getId().accept(this, arg); if (result != null) { return result; } } return null; }
public void visit(MultiTypeParameter n, Object arg) { printAnnotations(n.getAnnotations(), arg); printModifiers(n.getModifiers()); Iterator<Type> types = n.getTypes().iterator(); types.next().accept(this, arg); while (types.hasNext()) { printer.print(" | "); types.next().accept(this, arg); } printer.print(" "); n.getId().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; }
public CatchClause(int exceptModifier, List<AnnotationExpr> exceptAnnotations, List<Type> exceptTypes, VariableDeclaratorId exceptId, BlockStmt catchBlock) { this(new MultiTypeParameter(exceptModifier, exceptAnnotations, exceptTypes, exceptId), catchBlock); }
@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; }
@Override public void visit(final CatchClause n, final A arg) { visitComment(n.getComment(), arg); n.getExcept().accept(this, arg); n.getCatchBlock().accept(this, arg); }
public CatchClause(final int beginLine, final int beginColumn, final int endLine, final int endColumn, final int exceptModifier, final List<AnnotationExpr> exceptAnnotations, final List<Type> exceptTypes, final VariableDeclaratorId exceptId, final BlockStmt catchBlock) { super(beginLine, beginColumn, endLine, endColumn); setExcept(new MultiTypeParameter(beginLine, beginColumn, endLine, endColumn, exceptModifier, exceptAnnotations, exceptTypes, exceptId)); setCatchBlock(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 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); }