/** * Accepts the given visitor on a visit of the given live list of * child nodes. * <p> * This method must be used by the concrete implementations of * <code>accept</code> to traverse list-values properties; it * encapsulates the proper handling of on-the-fly changes to the list. * </p> * * @param visitor the visitor object * @param children the child AST node to dispatch too, or <code>null</code> * if none */ final void acceptChildren(ASTVisitor visitor, ASTNode.NodeList children) { // use a cursor to keep track of where we are up to // (the list may be changing under foot) NodeList.Cursor cursor = children.newCursor(); try { while (cursor.hasNext()) { ASTNode child = (ASTNode) cursor.next(); child.accept(visitor); } } finally { children.releaseCursor(cursor); } }
/** * Accepts the given visitor on a visit of the given live list of * child nodes. * <p> * This method must be used by the concrete implementations of * <code>accept</code> to traverse list-values properties; it * encapsulates the proper handling of on-the-fly changes to the list. * </p> * * @param visitor the visitor object * @param children the child AST node to dispatch too, or <code>null</code> * if none */ final void acceptChildren(ASTVisitor visitor, ASTNode.NodeList children) { // use a cursor to keep track of where we are up to // (the list may be changing under foot) NodeList.Cursor cursor = children.newCursor(); try { while (cursor.hasNext()) { ASTNode child = (ASTNode) cursor.next(); child.accept(visitor); } } finally { children.releaseCursor(cursor); } }
/** * Accepts the given visitor on a visit of the given live list of * child nodes. * <p> * This method must be used by the concrete implementations of * <code>accept</code> to traverse list-values properties; it * encapsulates the proper handling of on-the-fly changes to the list. * </p> * * @param visitor the visitor object * @param children the child AST node to dispatch too, or <code>null</code> * if none */ final void acceptChildren(ASTVisitor visitor, ASTNode.NodeList children) { // use a cursor to keep track of where we are up to // (the list may be changing under foot) NodeList.Cursor cursor = children.newCursor(); try { while (cursor.hasNext()) { ASTNode child = (ASTNode) cursor.next(); child.accept(visitor); } } finally { children.releaseCursor(cursor); } }
/** * Accepts the given visitor on a visit of the given live list of * child nodes. * <p> * This method must be used by the concrete implementations of * <code>accept</code> to traverse list-values properties; it * encapsulates the proper handling of on-the-fly changes to the list. * </p> * * @param visitor the visitor object * @param children the child AST node to dispatch too, or <code>null</code> * if none */ final void acceptChildren(ASTVisitor visitor, ASTNode.NodeList children) { // use a cursor to keep track of where we are up to // (the list may be changing under foot) NodeList.Cursor cursor = children.newCursor(); try { while (cursor.hasNext()) { ASTNode child = (ASTNode) cursor.next(); child.accept(visitor); } } finally { children.releaseCursor(cursor); } }
/** * Accepts the given visitor on a visit of the given live list of * child nodes. * <p> * This method must be used by the concrete implementations of * <code>accept</code> to traverse list-values properties; it * encapsulates the proper handling of on-the-fly changes to the list. * </p> * * @param visitor the visitor object * @param children the child AST node to dispatch too, or <code>null</code> * if none */ final void acceptChildren(ASTVisitor visitor, ASTNode.NodeList children) { // use a cursor to keep track of where we are up to // (the list may be changing under foot) NodeList.Cursor cursor = children.newCursor(); try { while (cursor.hasNext()) { ASTNode child = (ASTNode) cursor.next(); child.accept(visitor); } } finally { children.releaseCursor(cursor); } }
/** * Accepts the given visitor on a visit of the given live list of * child nodes. * <p> * This method must be used by the concrete implementations of * <code>accept</code> to traverse list-values properties; it * encapsulates the proper handling of on-the-fly changes to the list. * </p> * * @param visitor the visitor object * @param children the child AST node to dispatch too, or <code>null</code> * if none */ final void acceptChildren(ASTVisitor visitor, ASTNode.NodeList children) { // use a cursor to keep track of where we are up to // (the list may be changing under foot) NodeList.Cursor cursor = children.newCursor(); try { while (cursor.hasNext()) { ASTNode child = (ASTNode) cursor.next(); child.accept(visitor); } } finally { children.releaseCursor(cursor); } }