PackageGraph class
Properties
allConstructedModelElements
→ Map <ConstructedModelElementsKey , ModelElement >
All ModelElement
s constructed for this package; a superset of
the elements gathered in _gatherModelElements
.
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
allImplementersAdded
↔ bool
It is safe to cache values derived from the _implementers
table if this
is true.
getter/setter pair
allInheritableElements
→ Map <InheritableElementsKey , 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
→ List <ModelElement >
late final
analysisContext
→ AnalysisContext
final
breadcrumbName
→ String
The name to use in breadcrumbs in the rendered documentation.
no setter
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
displayName
→ String
The name to use as text in the rendered documentation.
no setter
extensions
→ Iterable <Extension >
no setter
fullyQualifiedName
→ String
A qualified name, mostly for use in the web search functionality, and for
warnings printed in the terminal; not for display use in rendered HTML.
no setter inherited
hasEmbedderSdk
→ bool
final
no setter
hashCode
→ int
The hash code for this object.
no setter inherited
href
→ String ?
no setter inherited
implementers
→ Map <InheritingContainer , List <InheritingContainer > >
no setter
inheritanceManager
→ InheritanceManager3
final
inheritThrough
→ Set <Class >
The set of Class
es which should not be presented as implementers.
late final
isPublic
→ bool
Whether this is "package-public."
no setter inherited
libraries
→ List <Library >
late final
library
→ Library?
no setter inherited
libraryCount
→ int
no setter
libraryExports
→ 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
name
→ String
no setter
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
→ Iterable <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
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
sdkLibrarySources
→ Map <Source? , SdkLibrary >
final
specialClasses
→ SpecialClasses
The collection of "special" classes for which we need some special access.
final
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.
configSetsNodocFor (String fullName )
→ bool
Given an element's fullName
, look up the nodoc configuration data and
determine whether to unconditionally treat the element as "nodoc", an
attribute indicating that documentation should not be included in
dartdoc's generated output.
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).
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.
gatherModelNodes (DartDocResolvedLibrary resolvedLibrary )
→ void
Populate's _modelNodes
with elements in resolvedLibrary
.
getHtmlFragment (String ? name )
→ String ?
getMacro (String name )
→ String ?
Returns a macro by name
, or null
if no macro is found.
getModelFor (Element element , Library library , {Container? enclosingContainer })
→ ModelElement
Returns the ModelElement
for element
, instantiating it if needed.
inherited
getModelForElement (Element element )
→ ModelElement
Returns the ModelElement
for element
, instantiating it if needed.
inherited
getModelForPropertyInducingElement (PropertyInducingElement element , Library library , {required Accessor? getter , required Accessor? setter , Container? enclosingContainer })
→ ModelElement
Returns the ModelElement
for element
, instantiating it if needed.
inherited
getModelNodeFor (Element element )
→ ModelNode?
getTypeFor (DartType type , Library library )
→ ElementType
Returns the ElementType
for type
, instantiating it if needed.
inherited
initializeCategories ()
→ void
Initializes the category mappings in all packages .
initializePackageGraph ()
→ Future <void >
Call after all libraries are added.
isAnnotationVisible (Class class_ )
→ bool
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
referenceBy (List <String > reference , {required bool filter (CommentReferable? ), bool tryParents = true , Iterable <CommentReferable > ? parentOverrides })
→ CommentReferable?
Looks 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 = const [] , Iterable <String > extendedDebug = const [] })
→ void