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

Method getParentList

src/main/java/groovy/util/Node.java:145–156  ·  view source on GitHub ↗
(Node parent)

Source from the content-addressed store, hash-verified

143 }
144
145 private static List getParentList(Node parent) {
146 Object parentValue = parent.value();
147 List parentList;
148 if (parentValue instanceof List) {
149 parentList = (List) parentValue;
150 } else {
151 parentList = new NodeList();
152 parentList.add(parentValue);
153 parent.setValue(parentList);
154 }
155 return parentList;
156 }
157
158 /**
159 * Appends a child to the current node.

Callers 4

NodeMethod · 0.95
appendMethod · 0.95
removeMethod · 0.95
replaceNodeMethod · 0.95

Calls 3

addMethod · 0.65
setValueMethod · 0.65
valueMethod · 0.45

Tested by

no test coverage detected