< prev index next >

src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.java

Print this page
rev 47329 : 8189102: All tools should support -?, -h and --help


 463             }
 464             if (options.has(argQuiet)) {
 465                 quiet = true;
 466             }
 467             return super.parse(options);
 468         }
 469     }
 470 
 471     // option parsing for command-line
 472     private class OptionParserCommandLine extends OptionParserBase {
 473 
 474         private final OptionSpec<String> argStart = parser.accepts("startup").withRequiredArg();
 475         private final OptionSpecBuilder argNoStart = parser.acceptsAll(asList("n", "no-startup"));
 476         private final OptionSpec<String> argFeedback = parser.accepts("feedback").withRequiredArg();
 477         private final OptionSpec<String> argExecution = parser.accepts("execution").withRequiredArg();
 478         private final OptionSpecBuilder argQ = parser.accepts("q");
 479         private final OptionSpecBuilder argS = parser.accepts("s");
 480         private final OptionSpecBuilder argV = parser.accepts("v");
 481         private final OptionSpec<String> argR = parser.accepts("R").withRequiredArg();
 482         private final OptionSpec<String> argC = parser.accepts("C").withRequiredArg();
 483         private final OptionSpecBuilder argHelp = parser.acceptsAll(asList("h", "help"));
 484         private final OptionSpecBuilder argVersion = parser.accepts("version");
 485         private final OptionSpecBuilder argFullVersion = parser.accepts("full-version");
 486         private final OptionSpecBuilder argShowVersion = parser.accepts("show-version");
 487         private final OptionSpecBuilder argHelpExtra = parser.acceptsAll(asList("X", "help-extra"));
 488 
 489         private String feedbackMode = null;
 490         private Startup initialStartup = null;
 491 
 492         String feedbackMode() {
 493             return feedbackMode;
 494         }
 495 
 496         Startup startup() {
 497             return initialStartup;
 498         }
 499 
 500         @Override
 501         void msg(String key, Object... args) {
 502             startmsg(key, args);
 503         }




 463             }
 464             if (options.has(argQuiet)) {
 465                 quiet = true;
 466             }
 467             return super.parse(options);
 468         }
 469     }
 470 
 471     // option parsing for command-line
 472     private class OptionParserCommandLine extends OptionParserBase {
 473 
 474         private final OptionSpec<String> argStart = parser.accepts("startup").withRequiredArg();
 475         private final OptionSpecBuilder argNoStart = parser.acceptsAll(asList("n", "no-startup"));
 476         private final OptionSpec<String> argFeedback = parser.accepts("feedback").withRequiredArg();
 477         private final OptionSpec<String> argExecution = parser.accepts("execution").withRequiredArg();
 478         private final OptionSpecBuilder argQ = parser.accepts("q");
 479         private final OptionSpecBuilder argS = parser.accepts("s");
 480         private final OptionSpecBuilder argV = parser.accepts("v");
 481         private final OptionSpec<String> argR = parser.accepts("R").withRequiredArg();
 482         private final OptionSpec<String> argC = parser.accepts("C").withRequiredArg();
 483         private final OptionSpecBuilder argHelp = parser.acceptsAll(asList("?", "h", "help"));
 484         private final OptionSpecBuilder argVersion = parser.accepts("version");
 485         private final OptionSpecBuilder argFullVersion = parser.accepts("full-version");
 486         private final OptionSpecBuilder argShowVersion = parser.accepts("show-version");
 487         private final OptionSpecBuilder argHelpExtra = parser.acceptsAll(asList("X", "help-extra"));
 488 
 489         private String feedbackMode = null;
 490         private Startup initialStartup = null;
 491 
 492         String feedbackMode() {
 493             return feedbackMode;
 494         }
 495 
 496         Startup startup() {
 497             return initialStartup;
 498         }
 499 
 500         @Override
 501         void msg(String key, Object... args) {
 502             startmsg(key, args);
 503         }


< prev index next >