DartdocOptionArgOnly<T> class

A DartdocOption that only exists as a command line argument. --help is a good example.

Inheritance

Constructors

DartdocOptionArgOnly(String name, T defaultsTo, ResourceProvider resourceProvider, {String? abbr, bool mustExist = false, String help = '', bool hide = false, OptionKind optionIs = OptionKind.other, bool negatable = false, bool splitCommas = false})

Properties

abbr String?
For ArgParser, set to a single character to have a short version of the command line argument.
final
argName String
The name of this option as a command line argument.
no setterinherited
defaultsTo → T?
This is the value returned if we couldn't find one otherwise.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
help String
Text string for help passed on in command line options.
finalinherited
hide bool
For ArgParser, set to true to hide this from the help menu.
final
isDir bool
Set to true if this option represents the name of a directory.
no setterinherited
isFile bool
Set to true if this option represents the name of a file.
no setterinherited
isGlob bool
Set to true if this option represents a glob.
no setterinherited
keys Iterable<String>
All object names starting at the root.
no setterinherited
mustExist bool
Set to true if DartdocOption subclasses should validate that the directory or file exists. Does not imply validation of defaultsTo, and requires that one of isDir or isFile is set.
finalinherited
name String
The name of this option, not including the names of any parents.
finalinherited
negatable bool
For ArgParser, set to true if the argument can be negated with --no on the command line.
final
optionIs OptionKind
finalinherited
parent DartdocOption
To avoid accessing early, call add on the option's parent before looking up unless this is a DartdocOptionRoot.
latefinalinherited
resourceProvider → ResourceProvider
finalinherited
root DartdocOptionRoot
The DartdocOptionRoot containing this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
splitCommas bool
For ArgParser, set to true if a single string argument will be broken into a list on commas.
final

Methods

add(DartdocOption<Object?> option) → void
Adds a DartdocOption to the children of this DartdocOption.
inherited
addAll(Iterable<DartdocOption<Object?>> options) → void
Adds a list of dartdoc options to the children of this DartdocOption.
inherited
getValueAs<U>(String name, Folder dir) → U
Get the immediate child of this node named name and its value at dir.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parseArguments(List<String> arguments) → void
Call this with argv to set up the argument overrides. Applies to all children.
inherited
toString() String
A string representation of this object.
inherited
traverse(void visit(DartdocOption<Object?> option)) → void
Apply the function visit to this and all children.
inherited
valueAt(Folder dir) → T?
valueAt for arguments ignores the dir parameter and only uses command line arguments and the current working directory to resolve the result.
inherited
valueAtCurrent() Object?
Calls valueAt with the working directory at the start of the program.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](String name) DartdocOption<Object?>
Get the immediate child of this node named name.
inherited