Package morfologik.tools
Class CliTool
java.lang.Object
morfologik.tools.CliTool
- All Implemented Interfaces:
Callable<ExitStatus>
- Direct Known Subclasses:
DictApply,DictCompile,DictDecompile,FSACompile,FSADecompile,FSAInfo
Base class for command-line applications.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static <T> TcheckNotNull(T arg) private static voidhelpDisplayCommandOptions(PrintStream pw, com.beust.jcommander.JCommander jc) private static voidhelpDisplayCommandOptions(PrintStream pw, String command, com.beust.jcommander.JCommander jc) protected static voidParse and execute a single command.protected static voidParse and execute one of the commands.protected static voidvoidsetCallSystemExit(boolean flag) CallSystem.exit(int)at the end of command processing.
-
Field Details
-
ARG_OVERWRITE
- See Also:
-
ARG_VALIDATE
- See Also:
-
callSystemExit
private boolean callSystemExit -
help
private boolean help
-
-
Constructor Details
-
CliTool
public CliTool()
-
-
Method Details
-
setCallSystemExit
public void setCallSystemExit(boolean flag) CallSystem.exit(int)at the end of command processing.- Parameters:
flag- CallSystem.exit(int)iftrue.
-
main
Parse and execute one of the commands.- Parameters:
args- Command line arguments (command and options).commands- A list of commands.
-
main
Parse and execute a single command.- Parameters:
args- Command line arguments (command and options).command- The command to execute.
-
printf
-
checkNotNull
protected static <T> T checkNotNull(T arg) -
helpDisplayCommandOptions
private static void helpDisplayCommandOptions(PrintStream pw, String command, com.beust.jcommander.JCommander jc) -
helpDisplayCommandOptions
-