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

Method get

src/main/java/groovy/util/Node.java:514–529  ·  view source on GitHub ↗

Provides lookup of elements by non-namespaced name @param key the name (or shortcut key) of the node(s) of interest @return the nodes which match key

(String key)

Source from the content-addressed store, hash-verified

512 * @return the nodes which match key
513 */
514 public Object get(String key) {
515 if (key != null && key.charAt(0) == '@') {
516 String attributeName = key.substring(1);
517 return attributes().get(attributeName);
518 }
519 if ("..".equals(key)) {
520 return parent();
521 }
522 if ("*".equals(key)) {
523 return children();
524 }
525 if ("**".equals(key)) {
526 return depthFirst();
527 }
528 return getByName(key);
529 }
530
531 /**
532 * Provides lookup of elements by QName.

Callers 1

getValueMethod · 0.95

Calls 9

attributesMethod · 0.95
parentMethod · 0.95
childrenMethod · 0.95
depthFirstMethod · 0.95
getByNameMethod · 0.95
substringMethod · 0.80
getMethod · 0.65
equalsMethod · 0.65
charAtMethod · 0.45

Tested by

no test coverage detected