public abstract class CmdLineProgram extends Object
| Modifier and Type | Field and Description |
|---|---|
protected com.beust.jcommander.JCommander |
argumentParser |
protected String |
command |
protected CommandBasicOptions |
commandBasicOptions |
protected CommandHelp |
commandHelp |
protected String[] |
originalArguments |
protected PrintStream |
out |
| Modifier | Constructor and Description |
|---|---|
protected |
CmdLineProgram(CommandBasicOptions commandLineArgs,
String progName) |
protected |
CmdLineProgram(PrintStream out,
CommandBasicOptions commandLineArgs,
String progName) |
| Modifier and Type | Method and Description |
|---|---|
void |
extraSetup() |
PrintStream |
getOutputStream() |
protected void |
parseArgs(String[] args) |
abstract ProgramExitStatus |
processCommand() |
protected ProgramExitStatus |
processHelpAndDescription() |
ProgramExitStatus |
run(String[] args) |
protected void |
setupCmds(AbstractCommand... cmds) |
protected void |
setupLoggers() |
void |
usage(String command) |
protected PrintStream out
protected final com.beust.jcommander.JCommander argumentParser
protected final CommandHelp commandHelp
protected String[] originalArguments
protected final CommandBasicOptions commandBasicOptions
protected String command
protected CmdLineProgram(PrintStream out, CommandBasicOptions commandLineArgs, String progName)
protected CmdLineProgram(CommandBasicOptions commandLineArgs, String progName)
public final PrintStream getOutputStream()
public void usage(String command)
public ProgramExitStatus run(String[] args)
protected void setupCmds(AbstractCommand... cmds)
protected void parseArgs(String[] args) throws FileNotFoundException, UnsupportedEncodingException
protected ProgramExitStatus processHelpAndDescription()
protected void setupLoggers()
throws UsageException,
IOException
UsageExceptionIOExceptionpublic void extraSetup()
public abstract ProgramExitStatus processCommand()
Copyright © 2020. All rights reserved.