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

Method print

src/main/java/groovy/lang/Script.java:173–184  ·  view source on GitHub ↗

Prints the value to the current 'out' variable which should be a PrintWriter or at least have a print() method defined on it. If there is no 'out' property then print to standard out.

(Object value)

Source from the content-addressed store, hash-verified

171 * If there is no 'out' property then print to standard out.
172 */
173 public void print(Object value) {
174 Object object;
175
176 try {
177 object = getProperty("out");
178 } catch (MissingPropertyException e) {
179 DefaultGroovyMethods.print(System.out,value);
180 return;
181 }
182
183 InvokerHelper.invokeMethod(object, "print", new Object[]{value});
184 }
185
186 /**
187 * Prints the value and a newline to the current 'out' variable which should be a PrintWriter

Callers

nothing calls this directly

Calls 3

getPropertyMethod · 0.95
printMethod · 0.95
invokeMethodMethod · 0.95

Tested by

no test coverage detected