Do you think is possible to get something like:
public class PicocliCommandLineRunner implements CommandLineRunner {
private final Object command;
public PicocliCommandLineRunner(Object command) {
this.command = command;
}
@Override
public void run(String... args) throws Exception {
CommandLine cli = new CommandLine(command);
if (cli.isHelpRequested()) {
CommandLine.usage(cli.getCommand(), System.out);
return;
}
}
}
Since in my use case, command is injected so I can't control the type of my command!