@Test public void support() throws Exception { TaskExecutor executor = new BasicCommandTaskExecutor(); assertThat( executor.isSupported(context, new MockTaskInfo("mock")), is(false)); assertThat( executor.isSupported(context, new BasicCommandTaskInfo("m", "t", "missing", Arrays.asList())), is(false)); assertThat( executor.isSupported(context, new BasicCommandTaskInfo("m", "t", command("mock.cmd"), Arrays.asList())), is(true)); }
@Override public boolean isSupported(TaskExecutionContext context, TaskInfo task) { return task instanceof CommandTaskInfo && isSupported(context, ((CommandTaskInfo) task).getCommand()); }
BasicCommandTaskExecutor implements TaskExecutor { @Override public boolean isSupported(TaskExecutionContext context, TaskInfo task) { return task instanceof CommandTaskInfo && isSupported(context, ((CommandTaskInfo) task).getCommand()); } }
BasicCommandTaskExecutor implements TaskExecutor { @Override public boolean isSupported(TaskExecutionContext context, TaskInfo task) { return task instanceof CommandTaskInfo && isSupported(context, ((CommandTaskInfo) task).getCommand()); } BasicCommandTaskExecutor();  BasicCommandTaskExecutor(Function<? super TaskExecutionContext, ? extends CommandLauncher> launchers); }
BasicCommandTaskExecutor implements TaskExecutor { @Override public boolean isSupported(TaskExecutionContext context, TaskInfo task) { return task instanceof CommandTaskInfo && isSupported(context, ((CommandTaskInfo) task).getCommand()); } BasicCommandTaskExecutor();  BasicCommandTaskExecutor(Function<? super TaskExecutionContext, ? extends CommandLauncher> launchers); @Override boolean isSupported(TaskExecutionContext context, TaskInfo task); @Override void execute(TaskExecutionContext context, TaskInfo task); static CommandLauncher getCommandLauncher(ExecutionContext context); static CommandLauncher getCommandLauncher(
            ExecutionContext context,
            BasicCommandLauncher.OutputConsumer output); static void execute(
            TaskExecutionContext context,
            Path command, List<String> arguments); static void execute(
            TaskExecutionContext context, CommandLauncher launcher,
            Path command, List<String> arguments); }
BasicCommandTaskExecutor implements TaskExecutor { @Override public boolean isSupported(TaskExecutionContext context, TaskInfo task) { return task instanceof CommandTaskInfo && isSupported(context, ((CommandTaskInfo) task).getCommand()); } BasicCommandTaskExecutor();  BasicCommandTaskExecutor(Function<? super TaskExecutionContext, ? extends CommandLauncher> launchers); @Override boolean isSupported(TaskExecutionContext context, TaskInfo task); @Override void execute(TaskExecutionContext context, TaskInfo task); static CommandLauncher getCommandLauncher(ExecutionContext context); static CommandLauncher getCommandLauncher(
            ExecutionContext context,
            BasicCommandLauncher.OutputConsumer output); static void execute(
            TaskExecutionContext context,
            Path command, List<String> arguments); static void execute(
            TaskExecutionContext context, CommandLauncher launcher,
            Path command, List<String> arguments); static final boolean WINDOWS; }