@Test public void testPrintHelp() throws ArgumentParserException { String h = "Alice was beginning to get very tired of sitting by her sister on the bank, and of having nothing to do"; ap.addArgument("bar").help(h); ap.addArgument("verylonglongpositionalargument").help(h); ap.addArgument("-f", "--foo").help(h); ap.addArgument("-1", "--1").metavar("X").nargs(2).help(h); ap.addArgument("-2").metavar("X").nargs("*").help(h); ap.addArgument("-3").metavar("X").nargs("+").help(h); ap.addArgument("-4").metavar("X").nargs("?").help(h); Subparsers subparsers = ap.addSubparsers().help("sub-command help"); Subparser parserA = subparsers.addParser("install"); parserA.help("parserA help"); subparsers.addParser("search"); ap.printHelp(new PrintWriter(System.out)); }
@Override public void printHelp() { PrintWriter writer = new PrintWriter(System.out); printHelp(writer); writer.flush(); }
ArgumentParserImpl implements ArgumentParser { @Override public void printHelp() { PrintWriter writer = new PrintWriter(System.out); printHelp(writer); writer.flush(); } }
ArgumentParserImpl implements ArgumentParser { @Override public void printHelp() { PrintWriter writer = new PrintWriter(System.out); printHelp(writer); writer.flush(); } ArgumentParserImpl(ArgumentParserConfigurationImpl config);  ArgumentParserImpl(ArgumentParserConfigurationImpl config,
            String command, ArgumentParserImpl mainParser); }
ArgumentParserImpl implements ArgumentParser { @Override public void printHelp() { PrintWriter writer = new PrintWriter(System.out); printHelp(writer); writer.flush(); } ArgumentParserImpl(ArgumentParserConfigurationImpl config);  ArgumentParserImpl(ArgumentParserConfigurationImpl config,
            String command, ArgumentParserImpl mainParser); @Override ArgumentImpl addArgument(String... nameOrFlags); ArgumentImpl addArgument(ArgumentGroupImpl group,
            String... nameOrFlags); @Override SubparsersImpl addSubparsers(); @Override ArgumentGroup addArgumentGroup(String title); @Override MutuallyExclusiveGroup addMutuallyExclusiveGroup(); @Override MutuallyExclusiveGroup addMutuallyExclusiveGroup(String title); @Override ArgumentParserImpl usage(String usage); @Override ArgumentParserImpl description(String description); @Override ArgumentParserImpl epilog(String epilog); @Override ArgumentParserImpl version(String version); @Override ArgumentParserImpl defaultHelp(boolean defaultHelp); @Override void printHelp(); @Override void printHelp(PrintWriter writer); @Override String formatHelp(); @Override void printUsage(); @Override void printUsage(PrintWriter writer); @Override String formatUsage(); @Override ArgumentParserImpl setDefault(String dest, Object value); @Override ArgumentParserImpl setDefaults(Map<String, Object> attrs); @Override Object getDefault(String dest); @Override Namespace parseArgsOrFail(String args[]); @Override Namespace parseKnownArgsOrFail(String args[], List<String> unknown); @Override Namespace parseArgs(String args[]); @Override Namespace parseKnownArgs(String args[], List<String> unknown); @Override void parseArgs(String[] args, Map<String, Object> attrs); @Override void parseKnownArgs(String[] args, List<String> unknown,
            Map<String, Object> attrs); @Override void parseArgs(String[] args, Object userData); @Override void parseKnownArgs(String[] args, List<String> unknown,
            Object userData); @Override void parseArgs(String[] args, Map<String, Object> attrs,
            Object userData); @Override void parseKnownArgs(String[] args, List<String> unknown,
            Map<String, Object> attrs, Object userData); void parseArgs(ParseState state, Map<String, Object> attrs); @Override ArgumentParserConfigurationImpl getConfig(); String getProg(); @Override void printVersion(); @Override void printVersion(PrintWriter writer); @Override String formatVersion(); @Override void handleError(ArgumentParserException e); @Override void handleError(ArgumentParserException e, PrintWriter writer); String getCommand(); String getPrefixChars(); String getFromFilePrefixChars(); }
ArgumentParserImpl implements ArgumentParser { @Override public void printHelp() { PrintWriter writer = new PrintWriter(System.out); printHelp(writer); writer.flush(); } ArgumentParserImpl(ArgumentParserConfigurationImpl config);  ArgumentParserImpl(ArgumentParserConfigurationImpl config,
            String command, ArgumentParserImpl mainParser); @Override ArgumentImpl addArgument(String... nameOrFlags); ArgumentImpl addArgument(ArgumentGroupImpl group,
            String... nameOrFlags); @Override SubparsersImpl addSubparsers(); @Override ArgumentGroup addArgumentGroup(String title); @Override MutuallyExclusiveGroup addMutuallyExclusiveGroup(); @Override MutuallyExclusiveGroup addMutuallyExclusiveGroup(String title); @Override ArgumentParserImpl usage(String usage); @Override ArgumentParserImpl description(String description); @Override ArgumentParserImpl epilog(String epilog); @Override ArgumentParserImpl version(String version); @Override ArgumentParserImpl defaultHelp(boolean defaultHelp); @Override void printHelp(); @Override void printHelp(PrintWriter writer); @Override String formatHelp(); @Override void printUsage(); @Override void printUsage(PrintWriter writer); @Override String formatUsage(); @Override ArgumentParserImpl setDefault(String dest, Object value); @Override ArgumentParserImpl setDefaults(Map<String, Object> attrs); @Override Object getDefault(String dest); @Override Namespace parseArgsOrFail(String args[]); @Override Namespace parseKnownArgsOrFail(String args[], List<String> unknown); @Override Namespace parseArgs(String args[]); @Override Namespace parseKnownArgs(String args[], List<String> unknown); @Override void parseArgs(String[] args, Map<String, Object> attrs); @Override void parseKnownArgs(String[] args, List<String> unknown,
            Map<String, Object> attrs); @Override void parseArgs(String[] args, Object userData); @Override void parseKnownArgs(String[] args, List<String> unknown,
            Object userData); @Override void parseArgs(String[] args, Map<String, Object> attrs,
            Object userData); @Override void parseKnownArgs(String[] args, List<String> unknown,
            Map<String, Object> attrs, Object userData); void parseArgs(ParseState state, Map<String, Object> attrs); @Override ArgumentParserConfigurationImpl getConfig(); String getProg(); @Override void printVersion(); @Override void printVersion(PrintWriter writer); @Override String formatVersion(); @Override void handleError(ArgumentParserException e); @Override void handleError(ArgumentParserException e, PrintWriter writer); String getCommand(); String getPrefixChars(); String getFromFilePrefixChars();  }