DocumentationComment mixin
Features for processing directives in a documentation comment.
_processCommentWithoutTools
and processComment are the primary
entrypoints.
- Superclass constraints
- Mixin applications
Properties
- canonicalLibrary → Library?
-
no setterinherited
- characterLocation → CharacterLocation?
-
no setterinherited
- config → DartdocOptionContext
-
no setterinherited
- definingCommentReferable → CommentReferable
-
For testing / comparison only, get the comment referable from where this
ElementType was defined. Override where an
Element
is available.no setterinherited - documentation → String?
-
no setterinherited
- documentationAsHtml → String?
-
latefinal
- documentationComment → String
-
The rawest form of the documentation comment, including comment delimiters
like
///
,//
,/*
,*/
.no setter -
documentationFrom
→ List<
DocumentationComment> -
The ModelElement from which we will get documentation.
no setteroverride
- documentationIsLocal → bool
-
True if documentationFrom contains only one item,
this
.no setterinherited - documentationLocal → String?
-
no setter
- element → Element?
-
no setterinherited
- elementDocumentation → Documentation
-
latefinal
- enclosingElement → Warnable?
-
no setterinherited
- fullyQualifiedName → String
-
no setterinherited
- fullyQualifiedNameWithoutLibrary → String?
-
no setter
- hasDocumentation → bool
-
no setterinherited
- hasDocumentationComment → bool
-
True if
this
has a synthetic/inherited or local documentation comment. False otherwise.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- hasNodoc → bool
-
Returns true if the raw documentation comment has a 'nodoc' indication.
latefinal
- hasSourceCode → bool
-
no setterinherited
- href → String?
-
no setterinherited
- isCanonical → bool
-
no setterinherited
- isDocumented → bool
-
no setterinherited
- kind → String
-
no setterinherited
- library → Library?
-
no setterinherited
- location → String
-
A string indicating the URI of this Locatable, usually derived from
Element.location
.no setterinherited -
locationPieces
→ Set<
String> -
Pieces of the location, split to remove 'package:' and slashes.
no setterinherited
- modelBuilder → ModelObjectBuilder
-
Override implementations in unit tests to avoid requiring literal
ModelElements.
no setterinherited
- modelElementRenderer → ModelElementRenderer
-
no setter
- modelNode → ModelNode?
-
no setterinherited
- name → String
-
no setterinherited
- namePart → String
-
Utility getter/cache for
_MarkdownCommentReference._getResultsForClass
.latefinalinherited -
namePieces
→ Set<
String> -
latefinalinherited
- needsPrecache → bool
-
no setter
- oneLineDoc → String?
-
no setterinherited
- package → Package?
-
no setterinherited
- packageGraph → PackageGraph
-
no setterinherited
- pathContext → Context
-
no setter
-
referenceChildren
→ Map<
String, CommentReferable> -
Map of
referenceName
to the elements that are a member ofthis
, but not this model element itself. Can be cached.no setterinherited -
referenceGrandparentOverrides
→ Iterable<
CommentReferable> ? -
Replace the parents of parents.
referenceBy
ignores whatever might otherwise be implied by thereferenceParents
ofreferenceParents
, replacing them with this.no setterinherited - referenceName → String
-
no setterinherited
-
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 setterinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scope → Scope?
-
For any
CommentReferable
where an analyzerScope
exists (or can be constructed), implement this. This will take priority over lookups viareferenceChildren
. Can be cached.no setterinherited - sourceCode → String
-
no setterinherited
- sourceFileName → String?
-
no setter
Methods
-
buildDocumentationAddition(
String docs) → String - Override this to add more features to the documentation builder in a subclass.
-
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 -
injectMacros(
String rawDocs) → String - Replace {@macro ...} in API comments with the contents of the macro
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
precacheLocalDocs(
) → Future< void> - Unconditionally precache local documentation.
-
processComment(
String documentationComment) → Future< String> -
Process
documentationComment
, performing various actions based on{@}
-style directives, returning the processed result. -
processCommentDirectives(
String docs) → String -
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
-
scoreCanonicalCandidates(
Iterable< Library> libraries) → List<ScoredCandidate> -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
warn(
PackageWarning kind, {String? message, Iterable< Locatable> referredFrom = const [], Iterable<String> extendedDebug = const []}) → void -
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited