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

Method printf

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

Prints a formatted string using the specified format string and argument. @param format the format to follow @param value the value to be formatted

(String format, Object value)

Source from the content-addressed store, hash-verified

208 * @param value the value to be formatted
209 */
210 public void printf(String format, Object value) {
211 Object object;
212
213 try {
214 object = getProperty("out");
215 } catch (MissingPropertyException e) {
216 DefaultGroovyMethods.printf(System.out, format, value);
217 return;
218 }
219
220 InvokerHelper.invokeMethod(object, "printf", new Object[] { format, value });
221 }
222
223 /**
224 * Prints a formatted string using the specified format string and arguments.

Callers 4

mainMethod · 0.45
doCatMethod · 0.45
mainMethod · 0.45
mainMethod · 0.45

Calls 3

getPropertyMethod · 0.95
printfMethod · 0.95
invokeMethodMethod · 0.95

Tested by 2

mainMethod · 0.36
mainMethod · 0.36