DartdocOptionFileSynth<T> class
A class that defaults to a value computed from a closure, but can be overridden by a file.
- Inheritance
-
- Object
- DartdocOption<
T> - DartdocOptionFileSynth
- Mixed in types
Constructors
-
DartdocOptionFileSynth(String name, T _compute(DartdocSyntheticOption<
T> , Folder), ResourceProvider resourceProvider, {String help = ''})
Properties
- defaultsTo → T?
-
This is the value returned if we couldn't find one otherwise.
finalinherited
- fieldName → String
-
The name of the option, with nested options joined by
.
. For example:no setterinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- help → String
-
Text string for help passed on in command line options.
finalinherited
- 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
- 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
- parentDirOverridesChild → bool
-
If true, the parent directory's value overrides the child's.
no setter
- 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
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 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