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> T
checkNotNull
(T arg) private static void
helpDisplayCommandOptions
(PrintStream pw, com.beust.jcommander.JCommander jc) private static void
helpDisplayCommandOptions
(PrintStream pw, String command, com.beust.jcommander.JCommander jc) protected static void
Parse and execute a single command.protected static void
Parse and execute one of the commands.protected static void
void
setCallSystemExit
(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
-