CommandContext<O extends OptionDefinition, T> class
The configuration context for the individual command being run.
The contexts for the commands on the command line form a linked list via the prev and next fields.
Constructors
-
CommandContext({required AbstractCommand<
O, T> command, required Configuration<O> config, required CommandContext<OptionDefinition, T> ? prev, required ContextProvider provider, required CommandRunMode runMode, Configuration<BuiltinGlobalOption< ? builtinConfig})Object> >
Properties
-
builtinConfig
→ Configuration<
BuiltinGlobalOption< Object> > -
The configuration of the command's built-in options.
Empty for commands without built-in options.
final
-
command
→ AbstractCommand<
O, T> -
final
-
config
→ Configuration<
O> -
The configuration of the command's own (application-defined) options.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
next
↔ CommandContext<
OptionDefinition, T> ? -
The context of the succeeding command on the command line.
Null if this is the leaf command.
latefinal
-
prev
→ CommandContext<
OptionDefinition, T> ? -
The context of the preceding command on the command line.
Null if this is the root command.
final
- provider → ContextProvider
-
User-defined objects / state provider.
final
- runMode → CommandRunMode
-
Whether this context is part of executing or completing the command line.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
{AbstractCommand< O, T> ? command, Configuration<O> ? config, Configuration<BuiltinGlobalOption< ? builtinConfig, CommandContext<Object> >OptionDefinition, T> ? prev, CommandContext<OptionDefinition, T> ? next, ContextProvider? provider, CommandRunMode? runMode}) → CommandContext<O, T> -
leaf(
) → CommandContext< OptionDefinition, T> - Returns the leaf command's context.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
root(
) → CommandContext< OptionDefinition, T> - Returns the root command's context.
-
specifiedActionOptions(
) → List< ActionOptionMixin> - Returns the action options of the command that were specified on the command line, if any.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited