Entry point of the runner. @param args .
(String... args)
| 26 | * @param args . |
| 27 | */ |
| 28 | public static void main(String... args) { |
| 29 | // Note ljacqu 20151212: If the tools folder becomes a lot bigger, it will make sense to restrict the depth |
| 30 | // of this recursive collector |
| 31 | ClassCollector collector = new ClassCollector(ToolsConstants.TOOLS_TEST_SOURCE_ROOT, "tools"); |
| 32 | Map<String, ToolTask> tasks = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); |
| 33 | for (ToolTask task : collector.getInstancesOfType(ToolTask.class)) { |
| 34 | tasks.put(task.getTaskName(), task); |
| 35 | } |
| 36 | |
| 37 | ToolsRunner runner = new ToolsRunner(tasks); |
| 38 | if (args == null || args.length == 0) { |
| 39 | runner.promptAndExecuteTask(); |
| 40 | } else { |
| 41 | runner.executeAutomaticTasks(args); |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | private void promptAndExecuteTask() { |
| 46 | System.out.println("The following tasks are available:"); |
nothing calls this directly
no test coverage detected