Allow for an easy creation of unsupported shell opener

This commit is contained in:
crschnick 2024-03-02 18:27:38 +00:00
parent e3081e3a81
commit 9fbaa5a50b

View file

@ -4,6 +4,20 @@ import lombok.NonNull;
public interface ShellOpenFunction {
static ShellOpenFunction unsupported() {
return new ShellOpenFunction() {
@Override
public CommandBuilder prepareWithoutInitCommand() {
throw new UnsupportedOperationException();
}
@Override
public CommandBuilder prepareWithInitCommand(@NonNull String command) {
throw new UnsupportedOperationException();
}
};
}
static ShellOpenFunction of(String b) {
return new ShellOpenFunction() {
@Override