MCPcopy Index your code
hub / github.com/apache/groovy / getAt

Method getAt

src/main/java/groovy/util/NodeList.java:160–173  ·  view source on GitHub ↗

Provides lookup of elements by non-namespaced name. @param name the name or shortcut key for nodes of interest @return the nodes of interest which match name

(String name)

Source from the content-addressed store, hash-verified

158 * @return the nodes of interest which match name
159 */
160 public NodeList getAt(String name) {
161 NodeList answer = new NodeList();
162 for (Object child : this) {
163 if (child instanceof Node childNode) {
164 Object temp = childNode.get(name);
165 if (temp instanceof Collection) {
166 answer.addAll((Collection) temp);
167 } else {
168 answer.add(temp);
169 }
170 }
171 }
172 return answer;
173 }
174
175 /**
176 * Provides lookup of elements by QName.

Callers

nothing calls this directly

Implementers 2

NodeListsHoldersubprojects/groovy-xml/src/main/java/g
NodesHoldersubprojects/groovy-xml/src/main/java/g

Calls 4

getMethod · 0.65
addMethod · 0.65
getAtMethod · 0.65
addAllMethod · 0.45

Tested by

no test coverage detected