@Override public void postVisit(ASTNode node) { for (Iterator<ASTVisitor> iter = postVisitors.iterator(); iter.hasNext();) { final ASTVisitor v = iter.next(); try { v.postVisit(node); } catch (Exception e) { logFaultyVisitor(v, node, e); iter.remove(); } } }
/** * Accepts the given visitor on a visit of the current node. * * @param visitor the visitor object * @exception IllegalArgumentException if the visitor is null */ public final void accept(ASTVisitor visitor) { if (visitor == null) { throw new IllegalArgumentException(); } // begin with the generic pre-visit if (visitor.preVisit2(this)) { // dynamic dispatch to internal method for type-specific visit/endVisit accept0(visitor); } // end with the generic post-visit visitor.postVisit(this); }
/** * Accepts the given visitor on a visit of the current node. * * @param visitor the visitor object * @exception IllegalArgumentException if the visitor is null */ public final void accept(ASTVisitor visitor) { if (visitor == null) { throw new IllegalArgumentException(); } // begin with the generic pre-visit if (visitor.preVisit2(this)) { // dynamic dispatch to internal method for type-specific visit/endVisit accept0(visitor); } // end with the generic post-visit visitor.postVisit(this); }
/** * Accepts the given visitor on a visit of the current node. * * @param visitor the visitor object * @exception IllegalArgumentException if the visitor is null */ public final void accept(ASTVisitor visitor) { if (visitor == null) { throw new IllegalArgumentException(); } // begin with the generic pre-visit if (visitor.preVisit2(this)) { // dynamic dispatch to internal method for type-specific visit/endVisit accept0(visitor); } // end with the generic post-visit visitor.postVisit(this); }
/** * Accepts the given visitor on a visit of the current node. * * @param visitor the visitor object * @exception IllegalArgumentException if the visitor is null */ public final void accept(ASTVisitor visitor) { if (visitor == null) { throw new IllegalArgumentException(); } // begin with the generic pre-visit if (visitor.preVisit2(this)) { // dynamic dispatch to internal method for type-specific visit/endVisit accept0(visitor); } // end with the generic post-visit visitor.postVisit(this); }
/** * Accepts the given visitor on a visit of the current node. * * @param visitor the visitor object * @exception IllegalArgumentException if the visitor is null */ public final void accept(ASTVisitor visitor) { if (visitor == null) { throw new IllegalArgumentException(); } // begin with the generic pre-visit if (visitor.preVisit2(this)) { // dynamic dispatch to internal method for type-specific visit/endVisit accept0(visitor); } // end with the generic post-visit visitor.postVisit(this); }
/** * Accepts the given visitor on a visit of the current node. * * @param visitor the visitor object * @exception IllegalArgumentException if the visitor is null */ public final void accept(ASTVisitor visitor) { if (visitor == null) { throw new IllegalArgumentException(); } // begin with the generic pre-visit if (visitor.preVisit2(this)) { // dynamic dispatch to internal method for type-specific visit/endVisit accept0(visitor); } // end with the generic post-visit visitor.postVisit(this); }
@Override public void postVisit(ASTNode node) { Object property= node.getProperty(PROPERTY_KEY); if (property == RETAINED) { int end= node.getStartPosition() + node.getLength(); fRemovingStart= end; } else if (property == REMOVED) { if (fRemovingStart != -1) { int end= node.getStartPosition() + node.getLength(); removedStartsEnds.add(new int[] { fRemovingStart, end }); fRemovingStart= -1; } } super.postVisit(node); } });
@Override public void postVisit(ASTNode node) { Object property= node.getProperty(PROPERTY_KEY); if (property == RETAINED) { int end= node.getStartPosition() + node.getLength(); fRemovingStart= end; } else if (property == REMOVED) { if (fRemovingStart != -1) { int end= node.getStartPosition() + node.getLength(); removedStartsEnds.add(new int[] { fRemovingStart, end }); fRemovingStart= -1; } } super.postVisit(node); } });