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
public abstract class CliTool extends Object implements Callable<ExitStatus>
Base class for command-line applications.
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
ARG_OVERWRITE
protected static String
ARG_VALIDATE
-
Constructor Summary
Constructors Constructor Description CliTool()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static <T> T
checkNotNull(T arg)
protected static void
main(String[] args, CliTool command)
Parse and execute a single command.protected static void
main(String[] args, CliTool... commands)
Parse and execute one of the commands.protected static void
printf(String msg, Object... args)
void
setCallSystemExit(boolean flag)
CallSystem.exit(int)
at the end of command processing.
-
-
-
Field Detail
-
ARG_OVERWRITE
protected static final String ARG_OVERWRITE
- See Also:
- Constant Field Values
-
ARG_VALIDATE
protected static final String ARG_VALIDATE
- See Also:
- Constant Field Values
-
-
Method Detail
-
setCallSystemExit
public void setCallSystemExit(boolean flag)
CallSystem.exit(int)
at the end of command processing.- Parameters:
flag
- CallSystem.exit(int)
iftrue
.
-
main
protected static void main(String[] args, CliTool... commands)
Parse and execute one of the commands.- Parameters:
args
- Command line arguments (command and options).commands
- A list of commands.
-
main
protected static void main(String[] args, CliTool command)
Parse and execute a single command.- Parameters:
args
- Command line arguments (command and options).command
- The command to execute.
-
checkNotNull
protected static <T> T checkNotNull(T arg)
-
-