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

Method printAttributes

src/main/java/groovy/util/NodePrinter.java:142–161  ·  view source on GitHub ↗

Prints node attributes. @param attributes the attributes to print

(Map attributes)

Source from the content-addressed store, hash-verified

140 * @param attributes the attributes to print
141 */
142 protected void printAttributes(Map attributes) {
143 out.print("(");
144 boolean first = true;
145 for (Object o : attributes.entrySet()) {
146 Map.Entry entry = (Map.Entry) o;
147 if (first) {
148 first = false;
149 } else {
150 out.print(", ");
151 }
152 out.print(entry.getKey().toString());
153 out.print(":");
154 if (entry.getValue() instanceof String) {
155 out.print("'" + entry.getValue() + "'");
156 } else {
157 out.print(FormatHelper.toString(entry.getValue()));
158 }
159 }
160 out.print(")");
161 }
162
163}

Callers 1

printMethod · 0.95

Calls 6

toStringMethod · 0.95
toStringMethod · 0.65
getKeyMethod · 0.65
getValueMethod · 0.65
printMethod · 0.45
entrySetMethod · 0.45

Tested by

no test coverage detected