src/share/classes/org/openjdk/jigsaw/cli/Command.java
Print this page
*** 28,44 ****
import java.io.*;
import java.nio.file.*;
import java.util.*;
import org.openjdk.internal.joptsimple.OptionSet;
-
/* package */ abstract class Command<C> {
static class Exception
extends java.lang.Exception
{
-
private static final long serialVersionUID = 74132770414881L;
public Exception(String fmt, Object ... args) {
super(String.format(fmt, args));
}
--- 28,42 ----
*** 75,99 ****
}
public Exception(java.lang.Exception x) {
super(x);
}
-
}
protected boolean verbose;
protected boolean force;
protected boolean dry;
protected String command;
protected LinkedList<String> args;
protected OptionSet opts;
final void run(C context, OptionSet opts) throws Command.Exception {
verbose = opts.has("verbose");
force = opts.has("force");
dry = opts.has("dry-run");
! args = new LinkedList<String>(opts.nonOptionArguments());
command = args.remove();
this.opts = opts;
go(context);
}
--- 73,98 ----
}
public Exception(java.lang.Exception x) {
super(x);
}
}
protected boolean verbose;
protected boolean force;
protected boolean dry;
+ protected boolean quiet;
protected String command;
protected LinkedList<String> args;
protected OptionSet opts;
final void run(C context, OptionSet opts) throws Command.Exception {
verbose = opts.has("verbose");
force = opts.has("force");
dry = opts.has("dry-run");
! quiet = opts.has("quiet");
! args = new LinkedList<>(opts.nonOptionArguments());
command = args.remove();
this.opts = opts;
go(context);
}