ElementImpl class abstract

Base implementation for Element.

This class provides default implementations for many of the methods and properties defined in the Element interface.

Implemented types
Implementers

Constructors

ElementImpl.new()

Properties

codeLength int
The length of the code of this element in the file that contains the
no setteroverride
codeOffset int
The offset of the code of this element in the file that contains the
no setteroverride
didResolveMetadata bool
Whether the metadata of this element has been resolved.
getter/setter pair
documentationComment String?
The documentation comment associated with this element if it has one.
getter/setter pairoverride-getter
enclosingElement Element?
The enclosing element of this element.
no setterinherited
hasAlwaysThrows bool
Whether the element has an annotation of the form @alwaysThrows.
no setteroverride
hasDeprecated bool
Whether the element has an annotation of the form @deprecated or @Deprecated('..').
no setteroverride
hasDoNotStore bool
Whether the element has an annotation of the form @doNotStore.
no setteroverride
hasFactory bool
Whether the element has an annotation of the form @factory.
no setteroverride
hashCode int
The hash code for this object.
no setteroverride
hasInternal bool
Whether the element has an annotation of the form @internal.
no setteroverride
hasIsTest bool
Whether the element has an annotation of the form @isTest.
no setteroverride
hasIsTestGroup bool
Whether the element has an annotation of the form @isTestGroup.
no setteroverride
hasLiteral bool
Whether the element has an annotation of the form @literal.
no setteroverride
hasMustBeOverridden bool
Whether the element has an annotation of the form @mustBeOverridden.
no setteroverride
hasMustCallSuper bool
Whether the element has an annotation of the form @mustCallSuper.
no setteroverride
hasNonVirtual bool
Whether the element has an annotation of the form @nonVirtual.
no setteroverride
hasOptionalTypeArgs bool
Whether the element has an annotation of the form @optionalTypeArgs.
no setteroverride
hasOverride bool
Whether the element has an annotation of the form @override.
no setteroverride
hasProtected bool
Whether the element has an annotation of the form @protected.
no setteroverride
hasRedeclare bool
Whether the element has an annotation of the form @redeclare.
no setteroverride
hasReopen bool
Whether the element has an annotation of the form @reopen.
no setteroverride
hasRequired bool
Whether the element has an annotation of the form @required.
no setteroverride
hasSealed bool
Whether the element has an annotation of the form @sealed.
no setteroverride
hasUseResult bool
Whether the element has an annotation of the form @useResult or @UseResult('..').
no setteroverride
hasVisibleForOverriding bool
Whether the element has an annotation of the form @visibleForOverriding.
no setteroverride
identifier String
A String that uniquely identifies this element
no setteroverride
isPrivate bool
Whether the name of this element starts with an underscore.
no setteroverride
isPublic bool
Whether the name of this element does not start with an underscore.
no setteroverride
library LibraryElement
The library that contains this element.
no setterinherited
librarySrc Asset
The source code location of this element.
no setteroverride
metadata List<ElementAnnotation>
The metadata associated with this element.
no setteroverride
metadataResolveCallback ↔ void Function()?
Callback to resolve metadata.
getter/setter pair
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 setteroverride
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 setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
source String?
The source code of this element.
no setteroverride

Methods

addMetadata(ElementAnnotation annotation) → void
Adds a metadata annotation to this element.
getAnnotation(String name) ElementAnnotation?
Returns the first annotation with the given name, or null if no such
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setCodeRange(AstNode? node, int offset, int length) → void
Sets the code range for this element.
setNameRange(int offset, int length) → void
Sets the name range for this element.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override