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)
| 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. |