public class CLI extends Object
JstacsTool interface.
The generic description of command line parameters is automatically inferred from the corresponding Parameters and ParameterSets of
the JstacsTools.
If this class is used for a single JstacsTool, the parameters may be supplied directly using a key=value interface. In case of multiple tools, each specific tool may be addressed by its short name (JstacsTool.getShortName()).| Modifier and Type | Class and Description |
|---|---|
static class |
CLI.SysProtocol
Class for a
Protocol that prints messages to System.out and warnings to System.err
and additionally hold a log of all messages in a local StringBuffer that may be, e.g., stored to a file later. |
| Constructor and Description |
|---|
CLI(boolean[] configureThreads,
JstacsTool... tools)
Creates a new command line interface from a set of Jstacs tools.
|
CLI(JstacsTool... tools)
Creates a new command line interface for the tools provided.
|
CLI(String opt,
boolean[] configureThreads,
JstacsTool... tools)
Creates a new command line interface for the tools provided, where for
each tool multi-threading may be configured.
|
CLI(String description,
String opt,
boolean[] configureThreads,
JstacsTool... tools)
Creates a new command line interface for the tools provided, where for
each tool multi-threading may be configured.
|
| Modifier and Type | Method and Description |
|---|---|
void |
run(String[] args)
Runs this command line application with the specified arguments in
args. |
void |
wiki()
Creates the HTML code for wiki entries for the supplied tools.
|
public CLI(JstacsTool... tools)
tools - the toolspublic CLI(boolean[] configureThreads,
JstacsTool... tools)
configureThreads - if the tool at the corresponding index should be configured to use multiple threads, which also means that a parameter threads is displayed for this tooltools - (an array of) tool(s) that can be run via the command line interfacepublic CLI(String opt, boolean[] configureThreads, JstacsTool... tools)
opt - the additional arguments, may be an empty StringconfigureThreads - for each tool, if multi-threading option should be added to the list of parameterstools - the toolspublic CLI(String description, String opt, boolean[] configureThreads, JstacsTool... tools)
public void run(String[] args) throws Exception
args. This method would typically be called directly from the main
method.args - the arguments as supplied on the command lineException - in case of an errorpublic void wiki()