PackageGraph class

Mixed in types

Constructors

PackageGraph.uninitialized(DartdocOptionContext config, DartSdk sdk, bool hasEmbedderSdk, RendererFactory rendererFactory, PackageMetaProvider packageMetaProvider)
PackageGraph.UninitializedPackageGraph(DartdocOptionContext config, DartSdk sdk, bool hasEmbedderSdk, RendererFactory rendererFactory, PackageMetaProvider packageMetaProvider)
factory

Properties

allCanonicalModelElements Iterable<ModelElement>
read-only
allConstructedModelElements HashMap<Tuple3<Element, Library, Container>, ModelElement>
All ModelElements constructed for this package; a superset of allModelElements.
final
allExtensionsAdded bool
It is safe to cache values derived from the _extensions table if this is true.
read / write
allHrefs Map<String, Set<ModelElement>>
A lookup index for hrefs to allow warnings to indicate where a broken link or orphaned file may have come from. Not cached because ModelElements can be created at any time and we're basing this on more than just allLocalModelElements to make the error messages comprehensive.
read-only
allImplementorsAdded bool
It is safe to cache values derived from the _implementors table if this is true.
read / write
allInheritableElements HashMap<Tuple2<Element, Library>, Set<ModelElement>>
Anything that might be inheritable, place here for later lookup.
final
allLibraries Map<String, Library>
final
allLibrariesAdded bool
read / write
allLocalModelElements Iterable<ModelElement>
read-only
allModelElements Iterable<ModelElement>
read-only
config DartdocOptionContext
Dartdoc's configuration flags.
final
defaultPackage Package
read-only
defaultPackageName String
Name of the default package.
read-only
documentedExtensions Iterable<Extension>
read-only
documentedPackages Iterable<Package>
Documented packages are documented somewhere (local or remote).
read-only
element Element
read-only
extensions Iterable<Extension>
read-only
findRefElementCache HashMap<String, Set<ModelElement>>
read-only
fullyQualifiedName String
read-only, inherited
hasEmbedderSdk bool
final
hasFooterVersion bool
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
href String
read-only, inherited
implementors Map<Class, List<Class>>
read-only
inheritThrough Set<Class>
Return the set of Classes objects should inherit through if they show up in the inheritance chain. Do not call before interceptorElement is found. Add classes here if they are similar to Interceptor in that they are to be ignored even when they are the implementors of Inheritables, and the class these inherit from should instead claim implementation.
read-only
invisibleAnnotations Set<Class>
Returns the set of Class objects that are similar to pragma in that we should never count them as documentable annotations.
read-only
libraries Iterable<Library>
read-only
library Library
read-only, inherited
libraryElementReexportedBy Map<LibraryElement, Set<Library>>
read-only
localLibraries Iterable<Library>
read-only
localPackages List<Package>
Local packages are to be documented locally vs. remote or not at all.
read-only
localPublicLibraries Iterable<Library>
read-only
name String
read-only, override
namePart String
Utility getter/cache for _MarkdownCommentReference._getResultsForClass.
read-only, inherited
namePieces Set<String>
read-only, inherited
packageGraph PackageGraph
read / write, inherited-setter
packageMap Map<String, Package>
Map of package name to Package.
final
packageMeta PackageMeta
PackageMeta for the default package.
final
packageMetaProvider PackageMetaProvider
PackageMeta Provider for building PackageMetas.
final
packages List<Package>
read-only
packageWarningCounter → PackageWarningCounter
read-only
publicLibraries Iterable<Library>
read-only
publicPackages List<Package>
read-only
referenceChildren Map<String, CommentReferable>
Map of referenceName to the elements that are a member of this, but not this model element itself. Can be cached. [...]
read-only
referenceGrandparentOverrides Iterable<CommentReferable>
Replace the parents of parents. referenceBy ignores whatever might otherwise be implied by the referenceParents of referenceParents, replacing them with this.
read-only, inherited
referenceName String
read-only, inherited
referenceParents Iterable<CommentReferable>
Iterable of immediate "parents" to try resolving component parts. referenceBy stops at the first parent where a part is found. Can be cached.
read-only
rendererFactory → RendererFactory
Factory for renderers
final
resourceProvider ResourceProvider
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
scope Scope
For any CommentReferable where an analyzer Scope exists (or can be constructed), implement this. This will take priority over lookups via referenceChildren. Can be cached.
read-only, inherited
sdk → DartSdk
final
sdkLibrarySources Map<Source, SdkLibrary>
read-only
specialClasses ↔ SpecialClasses
read / write

Methods

addHtmlFragment(String name, String content) → void
addLibraryToGraph(DartDocResolvedLibrary resolvedLibrary) → void
Call during initialization to add a library to this PackageGraph. [...]
addMacro(String name, String content) → void
addSpecialLibraryToGraph(DartDocResolvedLibrary resolvedLibrary) → void
Call during initialization to add a library possibly containing special/non-documented elements to this PackageGraph. Must be called after any normal libraries.
childLookups(List<String> reference) Iterable<ReferenceChildrenLookup>
A list of lookups that should be attempted on children based on reference. This allows us to deal with libraries that may have separators in them. referenceBy stops at the first one found.
inherited
configSetsNodocFor(String fullName) bool
Given an element's location, look up the nodoc configuration data and determine whether to unconditionally treat the element as "nodoc".
findButDoNotCreateLibraryFor(Element e) Library
This is used when we might need a Library object that isn't actually a documentation entry point (for elements that have no Library within the set of canonical Libraries).
findCanonicalLibraryFor(Element e) Library
Tries to find a top level library that references this element.
findCanonicalModelElementFor(Element e, {Container preferredClass}) ModelElement
Tries to find a canonical ModelElement for this element. If we know this element is related to a particular class, pass preferredClass to disambiguate. [...]
findOrCreateLibraryFor(DartDocResolvedLibrary resolvedLibrary) Library
This is used when we might need a Library object that isn't actually a documentation entry point (for elements that have no Library within the set of canonical Libraries).
getHtmlFragment(String name) String
getMacro(String name) String
getModelNodeFor(Element element) ModelNode
initializePackageGraph() Future<void>
Call after all libraries are added.
isAnnotationVisible(Class clazz) bool
lookupViaScope(ReferenceChildrenLookup referenceLookup, bool allowTree(CommentReferable), bool filter(CommentReferable)) → CommentReferable
Looks up references by scope, skipping over results that do not match the given filter. [...]
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
populateModelNodeFor(Element element, Map<String, CompilationUnit> compilationUnitMap) → void
precacheLocalDocs() Iterable<Future<void>>
Generate a list of futures for any docs that actually require precaching.
recurseChildrenAndFilter(ReferenceChildrenLookup referenceLookup, CommentReferable result, {bool allowTree(CommentReferable), bool filter(CommentReferable)}) → CommentReferable
Given a result found in an implementation of lookupViaScope or _lookupViaReferenceChildren, recurse through children, skipping over results that do not match the filter.
inherited
referenceBy(List<String> reference, {bool tryParents = true, bool filter(CommentReferable), bool allowTree(CommentReferable), Iterable<CommentReferable> parentOverrides}) → CommentReferable
Look up a comment reference by its component parts. If tryParents is true, try looking up the same reference in any parents of this. Will skip over results that do not pass a given filter and keep searching. Will skip over entire subtrees whose parent node does not pass allowTree.
@nonVirtual, inherited
toString() String
A string representation of this object. [...]
override
warnOnElement(Warnable warnable, PackageWarning kind, {String message, Iterable<Locatable> referredFrom, Iterable<String> extendedDebug}) → void

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited