(Object... args)
| 13 | public class UtilModule { |
| 14 | |
| 15 | @Export |
| 16 | public String format(Object... args) { |
| 17 | if (args[0] instanceof String) { |
| 18 | String format = (String) args[0]; |
| 19 | return String.format(format, Arrays.copyOfRange(args, 1, args.length)); |
| 20 | } |
| 21 | else { |
| 22 | String concat = ""; |
| 23 | for(Object arg: args) { |
| 24 | concat += arg.toString() + " "; |
| 25 | } |
| 26 | return concat.trim(); |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | @Export |
| 31 | public void debug(String message) { |