DirectiveElement class abstract
Base class for representing directives within Dart libraries.
Directives are top-level constructs such as imports, exports, and part declarations that control how libraries interact with each other. This class provides access to the URI referenced by the directive and the library it belongs to or references.
- Inheritance
- Implementers
Constructors
Properties
- codeLength → int
-
The length of the code of this element in the file that contains the
no setterinherited
- codeOffset → int
-
The offset of the code of this element in the file that contains the
no setterinherited
- documentationComment → String?
-
The documentation comment associated with this element if it has one.
no setterinherited
- enclosingElement → Element?
-
The enclosing element of this element.
no setterinherited
- hasAlwaysThrows → bool
-
Whether the element has an annotation of the form
@alwaysThrows
.no setterinherited - hasDeprecated → bool
-
Whether the element has an annotation of the form
@deprecated
or@Deprecated('..')
.no setterinherited - hasDoNotStore → bool
-
Whether the element has an annotation of the form
@doNotStore
.no setterinherited - hasFactory → bool
-
Whether the element has an annotation of the form
@factory
.no setterinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- hasInternal → bool
-
Whether the element has an annotation of the form
@internal
.no setterinherited - hasIsTest → bool
-
Whether the element has an annotation of the form
@isTest
.no setterinherited - hasIsTestGroup → bool
-
Whether the element has an annotation of the form
@isTestGroup
.no setterinherited - hasLiteral → bool
-
Whether the element has an annotation of the form
@literal
.no setterinherited - hasMustBeOverridden → bool
-
Whether the element has an annotation of the form
@mustBeOverridden
.no setterinherited - hasMustCallSuper → bool
-
Whether the element has an annotation of the form
@mustCallSuper
.no setterinherited - hasNonVirtual → bool
-
Whether the element has an annotation of the form
@nonVirtual
.no setterinherited - hasOptionalTypeArgs → bool
-
Whether the element has an annotation of the form
@optionalTypeArgs
.no setterinherited - hasOverride → bool
-
Whether the element has an annotation of the form
@override
.no setterinherited - hasProtected → bool
-
Whether the element has an annotation of the form
@protected
.no setterinherited - hasRedeclare → bool
-
Whether the element has an annotation of the form
@redeclare
.no setterinherited - hasReopen → bool
-
Whether the element has an annotation of the form
@reopen
.no setterinherited - hasRequired → bool
-
Whether the element has an annotation of the form
@required
.no setterinherited - hasSealed → bool
-
Whether the element has an annotation of the form
@sealed
.no setterinherited - hasUseResult → bool
-
Whether the element has an annotation of the form
@useResult
or@UseResult('..')
.no setterinherited - hasVisibleForOverriding → bool
-
Whether the element has an annotation of the form
@visibleForOverriding
.no setterinherited - identifier → String
-
A String that uniquely identifies this element
no setterinherited
- isPrivate → bool
-
Whether the name of this element starts with an underscore.
no setterinherited
- isPublic → bool
-
Whether the name of this element does not start with an underscore.
no setterinherited
- library → LibraryElement
-
The library that contains this element.
no setterinherited
- librarySrc → Asset
-
The source code location of this element.
no setterinherited
-
metadata
→ List<
ElementAnnotation> -
The metadata associated with this element.
no setterinherited
- name → String
-
The name of the element.
no setterinherited
- nameLength → int
-
The length of the name of this element in the file that contains the
declaration of this element, or
0
if this element does not have a name.no setterinherited - nameOffset → int
-
The offset of the name of this element in the file that contains the
declaration of this element, or
-1
if this element is synthetic, does not have a name, or otherwise does not have an offset.no setterinherited - referencedLibrary → LibraryElement
-
The library element referenced by this directive.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- source → String?
-
The source code of this element.
no setterinherited
- srcId → String
-
A unique identifier for the source file containing this directive.
no setter
- stringUri → String
-
The string representation of the URI as it appears in the source code.
no setter
- uri → Uri
-
The resolved URI object for this directive.
no setter
Methods
-
getAnnotation(
String name) → ElementAnnotation? -
Returns the first annotation with the given name, or null if no such
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited