PackageGraph class
Properties
allCanonicalModelElements
→ Iterable <ModelElement >
no setter
allConstructedModelElements
→ HashMap <Tuple3<Element , Library , Container ? > , ModelElement ? >
All ModelElement
s 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.
getter/setter pair
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
ModelElement s can be created at any time and we're basing this
on more than just allLocalModelElements to make the error messages
comprehensive.
no setter
allImplementorsAdded
↔ bool
It is safe to cache values derived from the _implementors
table if this
is true.
getter/setter pair
allInheritableElements
→ HashMap <Tuple2<Element , Library > , Set <ModelElement > >
Anything that might be inheritable, place here for later lookup.
final
allLibraries
→ Map <String , Library >
All library objects related to this package; a superset of libraries .
final
allLibrariesAdded
↔ bool
getter/setter pair
allLocalModelElements
→ Iterable <ModelElement >
late final
config
→ DartdocOptionContext
Dartdoc's configuration flags.
final
dartCoreObject
→ String
The String name representing the Object
type.
late final
defaultPackage
→ Package
late final
defaultPackageName
→ String
Name of the default package.
no setter
For testing / comparison only, get the comment referable from where this
ElementType was defined. Override where an Element
is available.
no setter inherited
documentedExtensions
→ Iterable <Extension >
late final
documentedPackages
→ Iterable <Package >
Documented packages are documented somewhere (local or remote).
no setter
extensions
→ Iterable <Extension >
no setter
fullyQualifiedName
→ String
no setter inherited
hasEmbedderSdk
→ bool
final
no setter
hashCode
→ int
The hash code for this object.
no setter inherited
href
→ String ?
no setter inherited
implementors
→ Map <InheritingContainer , List <InheritingContainer > >
no setter
inheritThrough
→ Set <Class >
Return the set of Class
es 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 Inheritable s,
and the class these inherit from should instead claim implementation.
late final
invisibleAnnotations
→ Set <Class >
The set of Class
objects that are similar to pragma
in that we should never count them as documentable annotations.
late final
libraries
→ Iterable <Library >
late final
library
→ Library ?
no setter inherited
libraryCount
→ int
The number of libraries.
late final
libraryElementReexportedBy
→ Map <LibraryElement , Set <Library > >
no setter
localPackages
→ List <Package >
Local packages are to be documented locally vs. remote or not at all.
no setter
localPublicLibraries
→ Set <Library >
late final
modelBuilder
→ ModelObjectBuilder
Override implementations in unit tests to avoid requiring literal
ModelElement s.
late final inherited
name
→ String
no setter override
namePart
→ String
Utility getter/cache for _MarkdownCommentReference._getResultsForClass
.
late final inherited
namePieces
→ Set <String >
late final inherited
packageGraph
→ PackageGraph
no 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 PackageMeta s.
final
packages
→ List <Package >
no setter
packageWarningCounter
→ PackageWarningCounter
Keep track of warnings.
late final
publicLibraries
→ Set <Library >
late final
publicPackages
→ List <Package >
late final
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.
late final
referenceGrandparentOverrides
→ Iterable <CommentReferable > ?
Replace the parents of parents. referenceBy ignores whatever might
otherwise be implied by the referenceParents of referenceParents ,
replacing them with this.
no setter inherited
referenceName
→ String
no setter 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.
no setter
rendererFactory
→ RendererFactory
Factory for renderers
final
resourceProvider
→ ResourceProvider
no setter
runtimeType
→ Type
A representation of the runtime type of the object.
no setter 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.
no setter inherited
sdk
→ DartSdk
final
sdkLibrarySources
→ Map <Source? , SdkLibrary >
late final
specialClasses
↔ SpecialClasses
getter/setter pair
Methods
addHtmlFragment (String name , String content )
→ void
addLibraryToGraph (DartDocResolvedLibrary resolvedLibrary )
→ void
Adds resolvedLibrary
to the package graph, adding it to allLibraries ,
and to the Package which is created from the PackageMeta for the
library.
addMacro (String name , String content )
→ void
addSpecialLibraryToGraph (DartDocResolvedLibrary resolvedLibrary )
→ void
Adds resolvedLibrary
as a special library to the package graph, which
adds the library to allLibraries , but does not add it to any Package 's
list of 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".
dispose ()
→ void
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 e
. If we know
this element is related to a particular class, pass a preferredClass
to
disambiguate.
findOrCreateLibraryFor (DartDocResolvedLibrary resolvedLibrary )
→ Library
This is used when we might need a Library 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 ?
initializeCategories ()
→ void
Initializes the category mappings in all packages .
initializePackageGraph ()
→ Future <void >
Call after all libraries are added.
isAnnotationVisible (Class clazz )
→ bool
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
populateModelNodeFor (Element element , DartDocResolvedLibrary resolvedLibrary )
→ void
referenceBy (List <String > reference , {required bool filter (CommentReferable? ), required bool allowTree (CommentReferable? ), bool tryParents = true , Iterable <CommentReferable > ? parentOverrides })
→ CommentReferable?
Look up a comment reference by its component parts.
inherited
toString ()
→ String
A string representation of this object.
override
warnOnElement (Warnable? warnable , PackageWarning kind , {String ? message , Iterable <Locatable > ? referredFrom , Iterable <String > ? extendedDebug })
→ void