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.
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
A Container defined with a class declaration in Dart. [...]
Constructor
Container
A Container represents a Dart construct that can contain methods, operators, and fields, such as Class, Enum, or Extension. [...]
ContainerAccessor
A getter or setter that is a member of a Container.
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
DartdocFileWriter
DartdocGeneratorOptionContext
Helper class that consolidates option contexts for instantiating generators.
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 is 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. [...]
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.
DartDocResolvedLibrary
Contains the ResolvedLibraryResult and any additional information about the library coming from AnalysisDriver. [...]
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.
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.
Extension
Extension methods
FakePackageConfigProvider
Field
FileWriter
FunctionTypeElementType
A FunctionType that does not have an underpinning Element.
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.
Indexable
Something able to be indexed.
Library
LibraryContainer
A set of libraries, initialized after construction by accessing libraries. [...]
Locatable
Something that can be located for warning purposes.
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.
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.
NeverType
Operator
Package
A LibraryContainer that contains Library objects related to a particular package.
PackageBuilder
Everything you need to instantiate a PackageGraph object for documenting.
PackageConfigProvider
A provider of PackageConfig-finding methods. [...]
PackageGraph
PackageMeta
Describes a single package in the context of dartdoc. [...]
PackageMetaFailure
PackageMetaProvider
Sets the supported way of constructing PackageMeta objects. [...]
PackageWithoutSdkResolver
This class resolves package URIs, but only if a given SdkResolver doesn't resolve them. [...]
Parameter
ParameterizedElementType
PhysicalPackageConfigProvider
Privacy
Classes implementing this have a public/private distinction.
PubPackageBuilder
A package builder that understands pub package format.
PubPackageMeta
Default implementation of PackageMeta depends on pub packages.
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, Fields, 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
UndefinedElementType
An ElementType that isn't pinned to an Element (or one that is, but whose element is irrelevant).

Mixins

CommentProcessable
Features for processing directives in a documentation comment. [...]
ContainerMember
A ModelElement that is a Container member.
Extendable
Mixin for subclasses of ModelElement representing Elements that can be extension methods.
GeneratorContext
Dartdoc options related to generators generally.
GetterSetterCombo
Mixin for top-level variables and fields (aka properties)
Inheritable
Mixin for subclasses of ModelElement representing Elements that can be inherited from one class to another. [...]
MarkdownFileDocumentation
TypeParameters

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, 'late' : 2, 'inherited' : 3, 'inherited-gett…
programName → const String
'dartdoc'

Properties

categoryRegexp RegExp
@Deprecated('Public variable intended to be private; will be removed as early ' 'as Dartdoc 1.0.0'), read-only
HTMLBASE_PLACEHOLDER String
final
htmlInjectRegExp RegExp
@Deprecated('Public variable intended to be private; will be removed as early ' 'as Dartdoc 1.0.0'), read-only
locationSplitter RegExp
final
macroRegExp RegExp
@Deprecated('Public variable intended to be private; will be removed as early ' 'as Dartdoc 1.0.0'), read-only
needsPrecacheRegExp RegExp
This doc may need to be processed in case it has a template or html fragment.
final
pubPackageMetaProvider PackageMetaProvider
final
substituteNameVersion RegExp
@Deprecated('Public variable intended to be private; will be removed as early ' 'as Dartdoc 1.0.0'), read-only
utf8AllowMalformed Encoding
read / write

Functions

byFeatureOrdering(String a, String b) int
byName(Nameable a, Nameable b) int
clearPackageMetaCache() → void
createDartdocOptions(PackageMetaProvider packageMetaProvider) Future<List<DartdocOption<Object>>>
Instantiate dartdoc's configuration file and options parser with the given command line arguments.
createGeneratorOptions(PackageMetaProvider packageMetaProvider) Future<List<DartdocOption<Object>>>
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

ConvertYamlToType<T>(YamlMap, String, ResourceProvider) → T
OptionGenerator(PackageMetaProvider) Future<List<DartdocOption<Object>>>