/** * @deprecated * Use {@link #printExample(OptionHandlerFilter)} */ public String printExample(ExampleMode mode) { return printExample(mode, null); }
/** * @deprecated * Use {@link #printExample(OptionHandlerFilter)} */ public String printExample(ExampleMode mode) { return printExample(mode, null); }
/** * @deprecated * Use {@link #printExample(OptionHandlerFilter,ResourceBundle)} */ public String printExample(ExampleMode mode, ResourceBundle rb) { return printExample((OptionHandlerFilter) mode, rb); }
/** * Formats a command line example into a string. * * See {@link #printExample(OptionHandlerFilter, ResourceBundle)} for more details. * * @param filter * must not be {@code null}. * @return * always non-{@code null}. */ public String printExample(OptionHandlerFilter filter) { return printExample(filter, null); }
/** * @deprecated * Use {@link #printExample(OptionHandlerFilter,ResourceBundle)} */ public String printExample(ExampleMode mode, ResourceBundle rb) { return printExample((OptionHandlerFilter) mode, rb); }
/** * Formats a command line example into a string. * * See {@link #printExample(OptionHandlerFilter, ResourceBundle)} for more details. * * @param filter * must not be {@code null}. * @return * always non-{@code null}. */ public String printExample(OptionHandlerFilter filter) { return printExample(filter, null); }
/** * @deprecated * Use {@link #printExample(OptionHandlerFilter,ResourceBundle)} */ public String printExample(ExampleMode mode, ResourceBundle rb) { return printExample((OptionHandlerFilter) mode, rb); }
/** * @deprecated * Use {@link #printExample(OptionHandlerFilter)} */ public String printExample(ExampleMode mode) { return printExample(mode, null); }
/** * Formats a command line example into a string. * * See {@link #printExample(OptionHandlerFilter, ResourceBundle)} for more details. * * @param filter * must not be {@code null}. * @return * always non-{@code null}. */ public String printExample(OptionHandlerFilter filter) { return printExample(filter, null); }
/** * @deprecated * Use {@link #printExample(OptionHandlerFilter)} */ public String printExample(ExampleMode mode) { return printExample(mode, null); }
/** * @deprecated * Use {@link #printExample(OptionHandlerFilter,ResourceBundle)} */ public String printExample(ExampleMode mode, ResourceBundle rb) { return printExample((OptionHandlerFilter) mode, rb); }
/** * Formats a command line example into a string. * * See {@link #printExample(OptionHandlerFilter, ResourceBundle)} for more details. * * @param filter * must not be {@code null}. * @return * always non-{@code null}. */ public String printExample(OptionHandlerFilter filter) { return printExample(filter, null); }
private void invalidArgs(CmdLineParser parser, CmdLineException e) { System.err.println(e.getMessage()); System.err.println("java DownloadStatement [options...] arguments..."); // print the list of available options parser.printUsage(System.err); System.err.println(); // print option sample. This is useful some time System.err.println(" Example: java DownloadStatement " + parser.printExample(ExampleMode.ALL)); System.exit(1); }
private void invalidArgs(CmdLineParser parser, CmdLineException e) { System.err.println(e.getMessage()); System.err.println("java DownloadAccountInfo [options...] arguments..."); // print the list of available options parser.printUsage(System.err); System.err.println(); // print option sample. This is useful some time System.err.println(" Example: java DownloadAccountInfo " + parser.printExample(ExampleMode.ALL)); System.exit(1); }
private void invalidArgs(CmdLineParser parser, CmdLineException e) { System.err.println(e.getMessage()); System.err.println("java DownloadStatement [options...] arguments..."); // print the list of available options parser.printUsage(System.err); System.err.println(); // print option sample. This is useful some time System.err.println(" Example: java DownloadStatement " + parser.printExample(ExampleMode.ALL)); System.exit(1); }
/** * Prints the usage. * * @param parser - The command line parser. */ public static void printUsage(final CmdLineParser parser) { System.out.println("reqcoco-runner [options...] arguments..."); parser.printUsage(System.out); System.out.println(); System.out.println(" Example: reqcoco-runner " + parser.printExample(filter -> !filter.option.help())); } }
private void invalidArgs(CmdLineParser parser, CmdLineException e) { System.err.println(e.getMessage()); System.err.println("java DownloadAccountInfo [options...] arguments..."); // print the list of available options parser.printUsage(System.err); System.err.println(); // print option sample. This is useful some time System.err.println(" Example: java DownloadAccountInfo " + parser.printExample(ExampleMode.ALL)); System.exit(1); }
public static void main(String[] args) throws Exception { Args indexArgs = new Args(); CmdLineParser parser = new CmdLineParser(indexArgs, ParserProperties.defaults().withUsageWidth(90)); try { parser.parseArgument(args); } catch (CmdLineException e) { System.err.println(e.getMessage()); parser.printUsage(System.err); System.err.println("Example: "+ IndexFreebase.class.getSimpleName() + parser.printExample(OptionHandlerFilter.REQUIRED)); return; } new IndexFreebase(indexArgs.input, indexArgs.index, indexArgs.storeTriples, indexArgs.langEnOnly).run(); }
public static void main(String[] args) throws Exception { IndexCollection.Args indexCollectionArgs = new IndexCollection.Args(); CmdLineParser parser = new CmdLineParser(indexCollectionArgs, ParserProperties.defaults().withUsageWidth(90)); try { parser.parseArgument(args); } catch (CmdLineException e) { System.err.println(e.getMessage()); parser.printUsage(System.err); System.err.println("Example: " + IndexCollection.class.getSimpleName() + parser.printExample(OptionHandlerFilter.REQUIRED)); return; } new IndexCollection(indexCollectionArgs).run(); } }
private void showUsage() { getOutputStream().println("usage: " + getBinaryName() + getParser().printExample(OptionHandlerFilter.ALL, null) + "\n"); getParser().printUsage(getOutputStream()); }