Option verboseOption = Option.builder("v").longOpt("verbose").hasArg().optionalArg(true).argName("LEVEL") .desc("Set verbosity to LEVEL, default: " + simplifyOpts.getVerbosity()).build();
options.addOption( Option.builder( Character.toString( SHOW_VERSION ) ).longOpt( "show-version" ) .desc( "Display version information WITHOUT stopping build" ).build() ); options.addOption( Option.builder( ENCRYPT_MASTER_PASSWORD ).longOpt( "encrypt-master-password" ).hasArg().optionalArg( true ) .desc( "Encrypt master security password" ).build() ); options.addOption( Option.builder( ENCRYPT_PASSWORD ).longOpt( "encrypt-password" ).hasArg().optionalArg( true ) .desc( "Encrypt server password" ).build() ); options.addOption( Option.builder( THREADS ).longOpt( "threads" ).hasArg()
@Before public void setUp() throws Exception { parser = new DefaultParser(); Option optionT1 = Option.builder("t1").hasArg().numberOfArgs(1).optionalArg(true).argName("t1_path").build(); Option optionA = Option.builder("a").hasArg(false).build(); Option optionB = Option.builder("b").hasArg(false).build(); Option optionLast = Option.builder("last").hasArg(false).build(); options = new Options().addOption(optionT1).addOption(optionA).addOption(optionB).addOption(optionLast); }
" string that has to be a package name or part of it containing wildcards '*' for uninstalling. Can be multiple filter" + " Strings space separated. Example: 'com.android.*' or 'com.android.* com.google.*'.").build(); Option mainBugReport = Option.builder(ARG_BUGREPORT).longOpt("bugreport").argName("out folder").hasArg().optionalArg(true).desc("Creates" + " a generic bug report (including eg. logcat and screenshot) from all connected devices and zips it to the folder given as arg." + " If no folder is given tries to zips it in the location of the .jar.").build();
.hasArg(true) .required() .optionalArg(false) .numberOfArgs(1) .argName("PATH") .desc("Add peer to running node") .hasArg(true) .optionalArg(false) .numberOfArgs(1) .argName("URL")
"Shows a prompt to confirm before bootstrapping. (Useful to connect with JVisualVM before the bootstrapping sets the SecurityManager)") .numberOfArgs(1) .optionalArg(true) .type(String.class) .valueSeparator() .desc("Sets the explicit engine implementation. Note: Service Loader will be ignored.") .numberOfArgs(1) .optionalArg(true) .type(String.class) .valueSeparator()
.desc("load GTFS data from the given file").build()); options.addOption(Option.builder() .longOpt("validate").hasArg().optionalArg(true) .argName("namespace") .desc("validate the specified feed. defaults to the feed loaded with the --load option").build()); .desc("delete the feed for the specified namespace.").build()); options.addOption(Option.builder() .longOpt("json").hasArg().optionalArg(true) .argName("directory") .desc("optionally store results in specified directory (defaults to system temp)").build());
.desc("visualizes the getParserTree tree") .numberOfArgs(3) .optionalArg(true) .argName("content> <output> <exclude") .build();
.longOpt(SemuxOption.ACCOUNT.toString()) .desc(CliMessages.get("ChooseAction")) .hasArg(true).numberOfArgs(1).optionalArg(false).argName("action").type(String.class) .build(); addOption(accountOption); .longOpt(SemuxOption.DUMP_PRIVATE_KEY.toString()) .desc(CliMessages.get("PrintHexKey")) .hasArg(true).optionalArg(false).argName("address").type(String.class) .build(); addOption(dumpPrivateKeyOption); .longOpt(SemuxOption.IMPORT_PRIVATE_KEY.toString()) .desc(CliMessages.get("ImportHexKey")) .hasArg(true).optionalArg(false).argName("key").type(String.class) .build(); addOption(importPrivateKeyOption);
+ "\n<endMS> - End time in milliseconds to get captions of the TTML file.") .numberOfArgs(4) .optionalArg(true) .argName("<file> <offsetTC> <startTC> <endTC>") .build();
+ "\n<endMS> - End time in milliseconds to get captions of the TTML file.") .numberOfArgs(4) .optionalArg(true) .argName("<file> <offsetTC> <startTC> <endTC>") .build();
.desc("Path to configuration file") .hasArg(true) .optionalArg(false) .numberOfArgs(1) .argName("PATH")
.desc("list files") .hasArg() .optionalArg(true) .argName("PATH") .build()); .desc("archive file system") .hasArg() .optionalArg(true) .argName("FILE_SYSTEM_NAME") .build()); .desc("unarchive file system") .hasArg() .optionalArg(true) .argName("FILE_SYSTEM_NAME") .build());
@Override protected Options getOptions() { Options options = super.getOptions(); options.addOption(Option.builder("C") .argName("collection") .longOpt("collection") .desc("specify the collection class to use. This overrides the trec.collection.class property") .hasArg() .build()); options.addOption(Option.builder("j") .argName("singlepass") .longOpt("singlepass") .desc("use the single-pass indexer") .build()); options.addOption(Option.builder("p") .argName("threads") .longOpt("parallel") .optionalArg(true) .desc("use multiple threads for the indexer, and optionally specify the number of threads") .build()); options.addOption(Option.builder("b") .argName("blocks") .longOpt("blocks") .desc("record block (positions) in the index") .build()); return options; }
public TtmlConverterCmdLineParser() { help = new Option("h", "help", false, "Print this message"); ttml = Option.builder("t") .longOpt("ttml") .desc("Input TTML file parameters:" + "\n<file> - The TTML file path." + "\n<offsetMS> - Offset in milliseconds to shift captions of the TTML file." + "\n<startMS> - Start time in milliseconds to get captions of the TTML file." + "\n<endMS> - End time in milliseconds to get captions of the TTML file.") .numberOfArgs(4) .optionalArg(true) .argName("file> <offsetTC> <startTC> <endTC") .build(); out = Option.builder("o") .longOpt("outputFile") .desc("Output iTT file") .hasArg() .argName("outputFile") .build(); frameRate = Option.builder("f") .longOpt("frameRate") .desc("Frame rate of result iTT file") .hasArg() .argName("frameRate") .build(); Stream.of(help, ttml, out, frameRate).forEach(options::addOption); }
public Launcher() { Option dataDirOption = Option.builder() .longOpt(SemuxOption.DATA_DIR.toString()) .desc(CliMessages.get("SpecifyDataDir")) .hasArg(true).numberOfArgs(1).optionalArg(false).argName("path").type(String.class) .build(); addOption(dataDirOption); Option networkOption = Option.builder() .longOpt(SemuxOption.NETWORK.toString()).desc(CliMessages.get("SpecifyNetwork")) .hasArg(true).numberOfArgs(1).optionalArg(false).argName("name").type(String.class) .build(); addOption(networkOption); Option coinbaseOption = Option.builder() .longOpt(SemuxOption.COINBASE.toString()).desc(CliMessages.get("SpecifyCoinbase")) .hasArg(true).numberOfArgs(1).optionalArg(false).argName("index").type(Number.class) .build(); addOption(coinbaseOption); Option passwordOption = Option.builder() .longOpt(SemuxOption.PASSWORD.toString()).desc(CliMessages.get("WalletPassword")) .hasArg(true).numberOfArgs(1).optionalArg(false).argName(SemuxOption.PASSWORD.toString()) .type(String.class) .build(); addOption(passwordOption); }
@SuppressWarnings("static-access") public Options createCommandLineOptions() { Options opts = new Options(); opts.addOption(HELP_OPTION, "help", false, "Display help"); opts.addOption(Option.builder().longOpt(VERSION_OPTION) .desc("Version of this application") .build()); opts.addOption(FULLSCREEN_MODE, "fullscreen", false, "fullscreen mode"); opts.addOption(Option.builder().argName(WINDOWED_MODE) .longOpt("windowed") .optionalArg(true) .argName("widthxheight") .desc("Windowed mode with optional definition of window size like: 1280x780") .build()); opts.addOption(DisableProperties.DISABLE_RANDOM_EVENTS, false, "Disable random events"); opts.addOption(DisableProperties.DISABLE_AI_TRADING, false, "Disable AI trading"); opts.addOption(GAME_LOCALE, "lang", true, "Specify the locale to use"); // todo: andi 4/22/15: it might be a good idea to list all the available languages here, // this however would require do define the list of the available languages outside of ch.sahits.game.openpatrician.util.l10n.Locale // Perhaps create a simple standalone object holding the languages and using that object here and in ch.sahits.game.openpatrician.util.l10n.Locale. opts.addOption(CLIENT_OPTION, "client", false, "Start application in client mode. Currently unused. Either client or server must be specified"); opts.addOption(SERVER_OPTION, "server", false, "Start application in server mode. Currently unused. Either client or server must be specified"); return opts; }
static Arg filterDevice() { Option option = Option.builder("d") .longOpt("device") .desc("Device filter/s. Leave empty to select all devices/ disable user selection.") .argName("id/s") .hasArgs() .optionalArg(true) .build(); return new Arg(Property.FILTER_DEVICE, option, ArgsFactory::mapToLowerCase); }
protected final void addBooleanOption(String key, String description) { _options.addOption( Option.builder() .argName("true|false") .hasArg() .optionalArg(true) .desc(description) .longOpt(key) .build()); }
checkOption(Option.builder("a").desc("desc").optionalArg(false).build(), "a", "desc", null, Option.UNINITIALIZED, null, false, false, defaultSeparator, String.class); checkOption(Option.builder("a").desc("desc").optionalArg(true).build(), "a", "desc", null, Option.UNINITIALIZED, null, false, true, defaultSeparator, String.class); checkOption(Option.builder("a").desc("desc").valueSeparator(':').build(),