dartdoc library

A documentation generator for Dart.

Library interface is currently under heavy construction and may change drastically between minor revisions.

Classes

Accessor
Getters and setters.
CallableAnonymousElementType
This is an anonymous function using the generic function syntax (declared literally with "Function").
CallableElementType
A callable type that may or may not be backed by a declaration using the generic function syntax.
CallableElementTypeMixin
Any callable ElementType will mix-in this class, whether anonymous or not.
CallableGenericTypeAliasElementType
A Callable generic type alias that may or may not have a name.
Canonicalization
Classes extending this class have canonicalization support in Dartdoc.
Categorization
Mixin implementing dartdoc categorization for ModelElements.
Category
A category is a subcategory of a package, containing libraries tagged with a @category identifier.
CategoryConfiguration
A configuration class that can interpret category definitions from a YAML map.
CategoryDefinition
Defines the attributes of a category in the options file, corresponding to the 'categories' keyword in the options file, and populated by the CategoryConfiguration class.
Class
Constructor
Dartdoc
Generates Dart documentation for all public Dart libraries in the given directory.
DartdocFailure
This class is returned if dartdoc fails in an expected way (for instance, if there is an analysis error in the library).
DartdocFileMissing
DartdocGeneratorOptionContext
Helper class to initialize the default generators since they require GeneratorContext.
DartdocOption<T>
An abstract class for interacting with dartdoc options. [...]
DartdocOptionArgFile<T>
A DartdocOption that works with command line arguments and dartdoc_options files.
DartdocOptionArgOnly<T>
A DartdocOption that only exists as a command line argument. --help would be a good example.
DartdocOptionArgSynth<T>
A class that defaults to a value computed from a closure, but can be overridden on the command line.
DartdocOptionContext
An DartdocOptionSet wrapped in nice accessors specific to Dartdoc, which automatically passes in the right directory for a given context. Usually, a single ModelElement, Package, Category and so forth has a single context and so this can be made a member variable of those structures.
DartdocOptionContextBase
All DartdocOptionContext mixins should implement this, as well as any other DartdocOptionContext mixins they use for calculating synthetic options.
DartdocOptionError
DartdocOptionFileOnly<T>
DartdocOptionFileSynth<T>
A class that defaults to a value computed from a closure, but can be overridden by a file.
DartdocOptionSet
A DartdocOption that only contains other DartdocOptions and is not an option itself.
DartdocOptionSyntheticOnly<T>
A synthetic option takes a closure at construction time that computes the value of the configuration option based on other configuration options. Does not protect against closures that self-reference. If mustExist and isDir or isFile is set, computed values will be resolved to canonical paths.
DartdocResults
The results of a Dartdoc.generateDocs call.
DartdocSyntheticOption<T>
DartToolDefinition
A special kind of tool definition for Dart commands.
DefinedElementType
An ElementType associated with an Element.
Documentable
Bridges the gap between model elements and packages, both of which have documentation.
Dynamic
ElementType
Base class representing a type in Dartdoc. It wraps a DartType, and may link to a ModelElement.
EnclosedElement
An element that is enclosed by some other element. [...]
Enum
EnumField
Enum's fields are virtual, so we do a little work to create usable values for the docs.
Field
FileContents
Generator
An abstract class that defines a generator that generates documentation for a given package. [...]
GenericTypeAliasElementType
A non-callable type backed by a GenericTypeAliasElement.
GenericTypeAliasElementTypeMixin
Types backed by a GenericTypeAliasElement that may or may not be callable.
GetterSetterCombo
Mixin for top-level variables and fields (aka properties)
Indexable
Something able to be indexed.
Inheritable
Mixin for subclasses of ModelElement representing Elements that can be inherited from one class to another. [...]
InheritableAccessor
A getter or setter that is a member of a Class.
Library
LibraryContainer
A set of libraries, initialized after construction by accessing _libraries. Do not cache return values of any methods or members excepting _libraries and name before finishing initialization of a LibraryContainer.
MarkdownFileDocumentation
Method
Mixin
Implements the Dart 2.1 "mixin" style of mixin declarations.
ModelCommentReference
A stripped down CommentReference containing only that information needed for Dartdoc. Drops link to the CommentReference after construction.
ModelElement
This class is the foundation of Dartdoc's model for source code. All ModelElements are contained within a PackageGraph, and laid out in a structure that mirrors the availability of identifiers in the various namespaces within that package. For example, multiple Class objects for a particular identifier (ModelElement.element) may show up in different Librarys as the identifier is reexported. [...]
ModelFunction
A ModelElement for a FunctionElement that isn't part of a type definition.
ModelFunctionAnonymous
A ModelElement for a FunctionTypedElement that is an explicit typedef. [...]
ModelFunctionTyped
ModelFunctionTypedef
A ModelElement for a FunctionTypedElement that is part of an explicit typedef.
ModelNode
Stripped down information derived from AstNode containing only information needed for Dartdoc. Drops link to the AstNode after construction.
Nameable
Something that has a name.
Operator
Package
A LibraryContainer that contains Library objects related to a particular package.
PackageBuilder
Everything you need to instantiate a PackageGraph object for documenting.
PackageGraph
PackageMeta
PackageMetaFailure
PackageWithoutSdkResolver
This class resolves package URIs, but only if a given SdkResolver doesn't resolve them. [...]
Parameter
ParameterizedElementType
Privacy
Classes implementing this have a public/private distinction.
ScoredCandidate
This class represents the score for a particular element; how likely it is that this is the canonical element.
Snapshot
Manages the creation of a single snapshot file in a context where multiple async functions could be trying to use and/or create it. [...]
SnapshotCache
A singleton that keeps track of cached snapshot files. The dispose function must be called before process exit to clean up snapshots in the cache.
SourceCodeMixin
ToolConfiguration
A configuration class that can interpret ToolDefinitions from a YAML map.
ToolDefinition
Defines the attributes of a tool in the options file, corresponding to the 'tools' keyword in the options file, and populated by the ToolConfiguration class.
TopLevelContainer
A set of Classes, Enums, TopLevelVariables, ModelFunctions, Propertys, and Typedefs, possibly initialized after construction by accessing private member variables. Do not call any methods or members excepting name and the private Lists below before finishing initialization of a TopLevelContainer.
TopLevelVariable
Top-level variables. But also picks up getters and setters?
Typedef
TypeParameter
TypeParameterElementType
TypeParameters
UndefinedElementType
An ElementType that isn't pinned to an Element (or one that is, but whose element is irrelevant).

Constants

dartdocVersion → const String
packageVersion
featureOrder → const Map<String, int>
Items mapped less than zero will sort before custom annotations. Items mapped above zero are sorted after custom annotations. Items mapped to zero will sort alphabetically among custom annotations. Custom annotations are assumed to be any annotation or feature not in this map.
const {'read-only' : 1, 'write-only' : 1, 'read / write' : 1, 'covariant' : 2, 'final' : 2, 'inherited' : 3, 'inherited-getter' : 3, 'in…
name → const String
'dartdoc'

Properties

argMatcher → RegExp
Regexp to take care of splitting arguments, and handling the quotes around arguments, if any. [...]
final
basicToolRegExp → RegExp
final
categoryRegexp → RegExp
final
defaultSdkDir → Directory
read-only
directoryCurrent → Directory
Args are computed relative to the current directory at the time the program starts.
final
directoryCurrentPath → String
final
htmlInjectRegExp → RegExp
final
htmlRegExp → RegExp
final
locationSplitter → RegExp
final
macroRegExp → RegExp
final
needsPrecacheRegExp → RegExp
This doc may need to be processed in case it has a template or html fragment.
final
substituteNameVersion → RegExp
final
templateRegExp → RegExp
final
utf8AllowMalformed ↔ Encoding
read / write

Functions

byFeatureOrdering(String a, String b) → int
byName(Nameable a, Nameable b) → int
createDartdocOptions() → Future<List<DartdocOption>>
Instantiate dartdoc's configuration file and options parser with the given command line arguments.
resolveMultiplyInheritedElement(MultiplyInheritedExecutableElement e, Library library, PackageGraph packageGraph, Class enclosingClass) ModelElement
Resolves this very rare case incorrectly by picking the closest element in the inheritance and interface chains from the analyzer.

Enums

DocumentLocation
For a given package, indicate with this enum whether it should be documented locally, whether we should treat the package as missing and any references to it made canonical to this package, or remote, indicating that we can build hrefs to an external source.

Typedefs

OptionGenerator() → Future<List<DartdocOption>>