DartdocOptionArgSynth<T> class
A class that defaults to a value computed from a closure, but can be overridden on the command line.
- Inheritance
-
- Object
- DartdocOption<
T> - DartdocOptionArgSynth
- Implemented types
- Mixed-in types
Constructors
-
DartdocOptionArgSynth.new(String name, T _compute(DartdocSyntheticOption<
T> , Folder), ResourceProvider resourceProvider, {String? abbr, bool mustExist = false, String help = '', OptionKind optionIs = OptionKind.other, bool negatable = 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.no setter - 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.no setter
Methods
-
add(
DartdocOption< Object?> option) → void -
Adds a DartdocOption to the children of this DartdocOption.
inherited
-
addAll(
Iterable< DartdocOption< options) → voidObject?> > -
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 atdir
.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 DartdocOption and all children.inherited -
valueAt(
Folder dir) → T? -
Return the calculated value of this option, given the directory as
context.
override
-
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