Package convex.cli
Class Main
java.lang.Object
convex.cli.ACommand
convex.cli.Main
- All Implemented Interfaces:
Runnable
Convex CLI implementation
This is the main `convex` command and root for child commands.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncli()
Gets the current CLI main command instancepicocli.CommandLine
void
execute()
Execute this command.boolean
Checks if the CLI should output ANSI coloursboolean
Checks if the CLI is in interactive mode (user input permitted)boolean
Checks if the CLI is in strict (paranoid) modestatic void
Java main(...) entry point when run as a Java application.int
mainExecute
(String[] args) Command line execution entry point.void
Sets output to the specified file.protected int
verbose()
Gets the current verbosity level for the CLIMethods inherited from class convex.cli.ACommand
inform, inform, informError, informSuccess, informWarning, paranoia, println, println, printRecord, printResult, prompt, readPassword, run, showUsage
-
Field Details
-
commandLine
public picocli.CommandLine commandLine
-
-
Constructor Details
-
Main
public Main()
-
-
Method Details
-
execute
public void execute()Description copied from class:ACommand
Execute this command. Subclasses should override this to provide specific command functionality -
main
Java main(...) entry point when run as a Java application. Exits JVM process with specified exit code- Parameters:
args
- Command line arguments
-
mainExecute
Command line execution entry point. Can be run from Java code without terminating the JVM.- Parameters:
args
- Command line arguments- Returns:
- Process result value
-
isParanoid
public boolean isParanoid()Description copied from class:ACommand
Checks if the CLI is in strict (paranoid) mode- Overrides:
isParanoid
in classACommand
- Returns:
- true iff in strict mode
-
isColoured
public boolean isColoured()Description copied from class:ACommand
Checks if the CLI should output ANSI colours- Overrides:
isColoured
in classACommand
- Returns:
-
commandLine
public picocli.CommandLine commandLine()- Overrides:
commandLine
in classACommand
-
isInteractive
public boolean isInteractive()Description copied from class:ACommand
Checks if the CLI is in interactive mode (user input permitted)- Overrides:
isInteractive
in classACommand
- Returns:
- True if in interactive mode
-
verbose
protected int verbose()Description copied from class:ACommand
Gets the current verbosity level for the CLI -
setOut
Sets output to the specified file.- Parameters:
outFile
- String specifying file. `-` or `null` specifies STDOUT
-
cli
Description copied from class:ACommand
Gets the current CLI main command instance
-