Utility method to obtain the children of a given node that match the given type

@param astNode the parent node; may not be null
@param nodeType the type property of the target child node; may not be null
@return the list of typed nodes (may be empty)
540294
public List<AstNode> getChildrenForType( AstNode astNode,
                                             String nodeType ) {
        CheckArg.isNotNull(astNode, "astNode");
        CheckArg.isNotNull(nodeType, "nodeType");

        List<AstNode> childrenOfType = new ArrayList<AstNode>();
        for (AstNode child : astNode.getChildren()) {
            if (hasMixinType(child, nodeType)) {
                childrenOfType.add(child);
            }
            List<AstNode> subChildrenOfType = getChildrenForType(child, nodeType);
            childrenOfType.addAll(subChildrenOfType);
        }

        return childrenOfType;
    }
397059
@Override
    public Node getChildNode(String childNodeId)
    {
        NodeLink link = new NodeLink(getNodeId(), childNodeId);

        if (this.children == null)
        {
            return null;
        }
        else
        {
            return this.children.get(link);
        }
    }
255429
def get_child_types(tree):
    
    child_types = defaultdict(list)
    for i, child in enumerate(tree):
        child_types[get_tree_type(child)].append(i)
    return child_types
968438
private List<SiteNode> getChildren(SiteNode siteNode) {
		int childCount = siteNode.getChildCount();
		if (childCount == 0) {
			return Collections.emptyList();
		}

		List<SiteNode> children = new ArrayList<>(childCount);
		for (int i = 0; i < childCount; i++) {
			children.add((SiteNode) siteNode.getChildAt(i));
		}
		return children;
	}
1067543
public List<TLVElement> getChildElements(int tag) {
        List<TLVElement> elements = new LinkedList<>();
        for (TLVElement element : children) {
            if (tag == element.getType()) {
                elements.add(element);
            }
        }
        return elements;
    }
382666
public static List<Node> getChildren(Node node, String childNodeName)
    {
        List<Node> children = new ArrayList<Node>();
        NodeList childNodes = node.getChildNodes();
        for (int i=0; i<childNodes.getLength(); i++)
        {
            Node child = childNodes.item(i);
            String childName = child.getNodeName();
            if (childName.equalsIgnoreCase(childNodeName))
            {
                children.add(child);
            }
        }
        return children;
    }
515036
public XMLElementList getChildren() {
		if (children != null) {
			return children;
		}
		
		NodeList list = dom.getChildNodes();
		children = new XMLElementList();
		
		for (int i=0;i<list.getLength();i++) {
			if (list.item(i) instanceof Element) {
				children.add(new XMLElement((Element) list.item(i)));
			}
		}
		
		return children;
	}
17149
function (xmlNode, nodeName) {

            var childs = xmlNode.childNodes;

            for (var i = 0; i < childs.length; ++i) {

                var item = childs.item(i);

                if (item.nodeType !== 1) {
                    continue;
                }

                if ((item.nodeName && !nodeName) || (nodeName && nodeName === item.nodeName)) {
                    return item;
                }
            }

            return null;
        }
1030765
public static List<Element> getChildren(Element parent, String childName) {
		ArrayList<Element> children = new ArrayList<Element>();
		NodeList nodes = parent.getChildNodes();
		for (int i = 0; i < nodes.getLength(); ++i) {
			Node node = nodes.item(i);
			if ((node instanceof Element) && node.getNodeName().equals(childName))
				children.add((Element)node);
		}
		return children;
	}
210255
private List<NodeData> childNodesData() throws RepositoryException, AccessDeniedException
   {
      List<NodeData> storedNodes = new ArrayList<NodeData>(dataManager.getChildNodesData(nodeData()));
      Collections.sort(storedNodes, new NodeDataOrderComparator());
      return storedNodes;
   }
1211756
public static String getContentNodeType(String contentNodeTypeHeader)
   {
      if (contentNodeTypeHeader != null)
         return contentNodeTypeHeader;
      else
         return WebDavConst.NodeTypes.NT_RESOURCE;
   }
1174597
private static <T extends Node> ImmutableList<T> getAllMatchingNodesOfType(
      Node rootSoyNode, final Class<T> classObject, final Predicate<T> filter) {
    final ImmutableList.Builder<T> matchedNodesBuilder = ImmutableList.builder();
    // optimization to avoid navigating into expr trees if we can't possibly match anything
    final boolean exploreExpressions = ExprNode.class.isAssignableFrom(classObject);
    visitAllNodes(
        rootSoyNode,
        new NodeVisitor<Node, VisitDirective>() {
          @Override
          public VisitDirective exec(Node node) {
            if (classObject.isInstance(node)) {
              T typedNode = classObject.cast(node);
              if (filter.test(typedNode)) {
                matchedNodesBuilder.add(typedNode);
              }
            }
            if (!exploreExpressions && node instanceof ExprNode) {
              return VisitDirective.SKIP_CHILDREN;
            }
            return VisitDirective.CONTINUE;
          }
        });
    return matchedNodesBuilder.build();
  }
158342
public static Class getFieldType(ClassNode node, String fieldName) {
        while (node != null) {
            for (FieldNode field: node.getFields()) {
                if (field.getName().equals(fieldName)) {
                    return getFieldType(field);
                }
            }
            node = node.getOuterClass();
        }
        return null;
    }
370323
public List<ResourceHandle> getChildrenByType(final String type) {
        final ArrayList<ResourceHandle> children = new ArrayList<>();
        if (this.isValid()) {
            for (final Resource child : this.resource.getChildren()) {
                ResourceHandle handle = ResourceHandle.use(child);
                if (handle.isOfType(type)) {
                    children.add(handle);
                }
            }
        }
        return children;
    }
417237
final Collection<JcrNodeType> subtypesFor( JcrNodeType nodeType ) {
        List<JcrNodeType> subtypes = new LinkedList<JcrNodeType>();
        for (JcrNodeType type : this.nodeTypes.values()) {
            if (type.supertypes().contains(nodeType)) {
                subtypes.add(type);
            }
        }
        return subtypes;
    }
971665
public static List<Object> getAllNodes(TreeModel treeModel)
    {
        List<Object> result = new ArrayList<Object>();
        getAllDescendants(treeModel, treeModel.getRoot(), result);
        result.add(0, treeModel.getRoot());
        return result;
    }
1146090
public void setNodeType(int nodeType) {
        if (nodeType != Token.VAR
            && nodeType != Token.CONST
            && nodeType != Token.LET)
            throw new IllegalArgumentException("invalid node type");
        setType(nodeType);
    }