RevaliCommandRunner class abstract
Shared behavior for the outer revali CLI and the inner construct runner.
Both expose the same hidden verbosity flags and both need the logger flushed once a command finishes, so that lives here rather than being copied into each runner.
- Inheritance
- Implementers
Constructors
- RevaliCommandRunner(String executableName, String description, {required Logger logger})
Properties
- argParser → ArgParser
-
The top-level argument parser.
no setterinherited
-
commands
→ Map<
String, Command< int> > -
An unmodifiable view of all top-level commands defined for this runner.
no setterinherited
- description → String
-
A short description of this executable.
finalinherited
- executableName → String
-
The name of the executable being run.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- invocation → String
-
A single-line template for how to invoke this executable.
no setterinherited
- logger → Logger
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- suggestionDistanceLimit → int
-
The maximum edit distance allowed when suggesting possible intended
commands.
finalinherited
- usage → String
-
Generates a string displaying usage information for the executable.
no setterinherited
-
An optional footer for
usage.no setterinherited
Methods
-
addCommand(
Command< int> command) → void -
Adds
Commandas a top-level command to this runner.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parse(
Iterable< String> args) → ArgResults -
Parses
argsand returns the result, converting anArgParserExceptionto aUsageException.inherited -
printUsage(
) → void -
Prints the usage information for this runner.
inherited
-
run(
Iterable< String> args) → Future<int> -
Parses
argsand invokesCommand.runon the chosen command.override -
runCommand(
ArgResults topLevelResults) → Future< int> -
Runs the command specified by
topLevelResults.override -
toString(
) → String -
A string representation of this object.
inherited
-
usageException(
String message) → Never -
Throws a
UsageExceptionwithmessage.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited