io.quarkus.cli.plugin.ShellCommand Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-cli Show documentation
Show all versions of quarkus-cli Show documentation
Quarkus command line utility
package io.quarkus.cli.plugin;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Callable;
import io.quarkus.cli.common.OutputOptionMixin;
import picocli.CommandLine.Command;
@Command
public class ShellCommand implements PluginCommand, Callable {
private String name;
private Path command;
private OutputOptionMixin output;
private final List arguments = new ArrayList<>();
public ShellCommand() {
}
public ShellCommand(String name, Path command, OutputOptionMixin output) {
this.name = name;
this.command = command;
this.output = output;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public List getCommand() {
return List.of(command.toString());
}
public List getArguments() {
return arguments;
}
@Override
public void useArguments(List arguments) {
this.arguments.clear();
this.arguments.addAll(arguments);
}
public OutputOptionMixin getOutput() {
return output;
}
}