Visit Simons recursively as a tree starting from the specified Simon.

@param simon Parent simon
@param visitor Visitor
@throws IOException
199675
public static void visitTree(Simon simon, SimonVisitor visitor) throws IOException {
		visitor.visit(simon);
		for (Simon childSimon : simon.getChildren()) {
			visitTree(childSimon, visitor);
		}
	}
370873
@Override
  protected void visitExprNode(ExprNode node) {

    if (!(node instanceof ParentExprNode)) {
      return;
    }
    ParentExprNode nodeAsParent = (ParentExprNode) node;

    // Recurse.
    visitChildren(nodeAsParent);

    // If all children are constants, we attempt to preevaluate this node and replace it with a
    // constant.
    for (ExprNode child : nodeAsParent.getChildren()) {
      if (!isConstant(child)) {
        return; // cannot preevaluate
      }
    }
    attemptPreeval(nodeAsParent);
  }
1075014
@Override
	public void walkTree(IResourceVisitor visitor) throws IOException {
		if (!exists() || symname == null) {
			throw new IOException(getURI().toString());
		}
		Bundle bundle = Platform.getBundle(symname);
		recurse(bundle, getURI().getPath(), visitor, ""); //$NON-NLS-1$
	}
1261399
protected <R, C> R accept(AstVisitor<R, C> visitor, C context)
    {
        return visitor.visitNode(this, context);
    }
854081
@Override
    public Object visit(ParseTree tree) {
        if (!asBoolean(tree)) {
            return null;
        }

        return super.visit(tree);
    }
1140431
protected void callChildVisitors(XSLTVisitor visitor, boolean callAttributes)
  {
    for (ElemTemplateElement node = m_firstChild;
      node != null;
      node = node.m_nextSibling)
      {
      node.callVisitors(visitor);
    }
  }
959218
@Override
	public void accept(Visitor<Operator<?>> visitor) {
		boolean descend = visitor.preVisit(this);
		if (descend) {
			this.input1.accept(visitor);
			this.input2.accept(visitor);
			for (Operator<?> c : this.broadcastInputs.values()) {
				c.accept(visitor);
			}
			visitor.postVisit(this);
		}
	}
17169
public boolean visitTypeHierarchy(TypeMirror type, TypeVisitor visitor) {
    boolean result = true;
    if (type == null) {
      return result;
    }
    if (type.getKind() == TypeKind.DECLARED) {
      result = visitor.accept((DeclaredType) type);
    }
    for (TypeMirror superType : directSupertypes(type)) {
      if (!result) {
        return false;
      }
      result = visitTypeHierarchy(superType, visitor);
    }
    return result;
  }
364146
public static void visitPostOrder(Node node, Visitor visitor) {
    visitPostOrder(node, visitor, Predicates.alwaysTrue());
  }
1121829
private void recurse(Bundle bundle, String path, IResourceVisitor visitor, String relPathName) throws IOException {
		Enumeration<?> entries = bundle.findEntries(path, "*", false); //$NON-NLS-1$
		if (entries != null) {
			while (entries.hasMoreElements()) {
				URL child = (URL)entries.nextElement();
				String childPath = child.getPath();
				String temp = childPath;
				if (temp.endsWith("/")) { //$NON-NLS-1$
					temp = temp.substring(0, temp.length()-1);
				}
				int idx = temp.lastIndexOf("/"); //$NON-NLS-1$
				String childName = temp.substring(idx+1);
				String relPath = relPathName
						+ (relPathName.length() == 0 ? "" : "/") //$NON-NLS-1$ //$NON-NLS-2$
						+ childName;
				boolean result = visitor.visitResource(
						new VisitorResource(child, relPath), relPath);
				if (result && child.getPath().endsWith("/")) { //$NON-NLS-1$
					recurse(bundle, childPath, visitor, relPath);
				}
			}
		}
	}
1344872
public static void visitAllNodes(Node node, NodeVisitor<? super Node, VisitDirective> visitor) {
    ArrayDeque<Node> queue = new ArrayDeque<>();
    queue.add(node);
    Node current;
    while ((current = queue.poll()) != null) {
      switch (visitor.exec(current)) {
        case ABORT:
          return;
        case CONTINUE:
          if (current instanceof ParentNode<?>) {
            queue.addAll(((ParentNode<?>) current).getChildren());
          }
          if (current instanceof ExprHolderNode) {
            queue.addAll(((ExprHolderNode) current).getExprList());
          }
          continue;
        case SKIP_CHILDREN:
          continue;
      }
    }
  }
1133435
public void add(T parent, T child) {
        final Set<T> children = depTree.computeIfAbsent(parent, p -> new LinkedHashSet<>());
        if (!child.equals(parent)) {
            children.add(child);
        }
    }
527325
public boolean visitTypeHierarchyObjcOrder(TypeMirror type, TypeVisitor visitor) {
    boolean result = true;
    if (type == null) {
      return result;
    }
    if (type.getKind() == TypeKind.DECLARED) {
      result = visitor.accept((DeclaredType) type);
    }
    // Visit the class type after interface types which is the order the ObjC compiler visits the
    // hierarchy.
    TypeMirror classType = null;
    for (TypeMirror superType : directSupertypes(type)) {
      if (!result) {
        return false;
      }
      if (isClass(superType)) {
        classType = superType;
      } else {
        visitTypeHierarchyObjcOrder(superType, visitor);
      }
    }
    if (classType != null && result) {
      result = visitTypeHierarchyObjcOrder(classType, visitor);
    }
    return result;
  }
708583
public T simonProperty(Simon simon, String propertyName) throws IOException {
		Getter getter = GetterFactory.getGetter(simon.getClass(), propertyName);
		if (getter != null) {
			value(getter.get(simon), getter.getSubType());
		}
		return (T) this;
	}
1353842
public ClassNode visitPublicNotAbstractTreeNodes($.Visitor<ClassNode> visitor) {
        return visitTree($.guardedVisitor(new $.Predicate<ClassNode>() {
            @Override
            public boolean test(ClassNode classNode) {
                return classNode.publicNotAbstract();
            }
        }, visitor));
    }
950877
public void visit(Visitable visitable) {
    StreamSupport.stream(this.spliterator(), false).forEach(visitor -> visitor.visit(visitable));
  }
1165781
public void accept(XVisitor visitor, XAttributable parent) {
		/*
		 * First call.
		 */
		visitor.visitAttributePre(this, parent);
		if (this instanceof XAttributeCollection) {
			/*
			 * Visit the (meta) attributes using the order a specified by the collection.
			 */
			for (XAttribute attribute: ((XAttributeCollection) this).getCollection()) {
				attribute.accept(visitor, this);
			}
		} else {
			/*
			 * Visit the (meta) attributes.
			 */
			if (attributes != null) {
				for (XAttribute attribute: getAttributes().values()) {
					attribute.accept(visitor, this);
				}
			}
		}
		/*
		 * Last call.
		 */
		visitor.visitAttributePost(this, parent);
	}