ElementAnnotationImpl class

Implementation of an element annotation.

This class provides the concrete implementation of ElementAnnotation with support for recognizing common annotations from packages like 'meta' and 'dart:core'. It resolves the constant value of the annotation lazily to improve performance.

Implemented types

Constructors

ElementAnnotationImpl({required DartType type, required Element annotatedElement, required ConstantValueCompute constantValueCompute, required DeclarationRef declarationRef})
Creates an element annotation with the specified parameters.

Properties

annotatedElement → Element
The element that this annotation is applied to.
final
constant → Constant
The constant value of this annotation.
no setteroverride
declarationRef → DeclarationRef
Reference to the declaration of this annotation.
final
hashCode → int
The hash code for this object.
no setterinherited
isAlwaysThrows → bool
Whether this annotation is @alwaysThrows from the meta package.
no setteroverride
isDeprecated → bool
Whether this annotation is @deprecated or @Deprecated from dart:core.
no setteroverride
isDoNotStore → bool
Whether this annotation is @doNotStore from the meta package.
no setteroverride
isFactory → bool
Whether this annotation is @factory from the meta package.
no setteroverride
isImmutable → bool
Whether this annotation is @immutable from the meta package.
no setteroverride
isInternal → bool
Whether this annotation is @internal from the meta package.
no setteroverride
isIsTest → bool
Whether this annotation is @isTest from the meta package.
no setteroverride
isIsTestGroup → bool
Whether this annotation is @isTestGroup from the meta package.
no setteroverride
isLiteral → bool
Whether this annotation is @literal from the meta package.
no setteroverride
isMustBeOverridden → bool
Whether this annotation is @mustBeOverridden from the meta package.
no setteroverride
isMustCallSuper → bool
Whether this annotation is @mustCallSuper from the meta package.
no setteroverride
isNonVirtual → bool
Whether this annotation is @nonVirtual from the meta package.
no setteroverride
isOptionalTypeArgs → bool
Whether this annotation is @optionalTypeArgs from the meta package.
no setteroverride
isOverride → bool
Whether this annotation is @override from dart:core.
no setteroverride
isProtected → bool
Whether this annotation is @protected from the meta package.
no setteroverride
isRedeclare → bool
Whether this annotation is @redeclare from the meta package.
no setteroverride
isReopen → bool
Whether this annotation is @reopen from the meta package.
no setteroverride
isRequired → bool
Whether this annotation is @required from the meta package.
no setteroverride
isSealed → bool
Whether this annotation is @sealed from the meta package.
no setteroverride
isTarget → bool
Whether this annotation is @Target from the meta_meta package.
no setteroverride
isUseResult → bool
Whether this annotation is @useResult or @UseResult from the meta package.
no setteroverride
isVisibleForOverriding → bool
Whether this annotation is @visibleForOverriding from the meta package.
no setteroverride
name → String
The name of the annotation as it appears in code.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → DartType
The type of this annotation.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited