ElementAnnotation class abstract

Represents an annotation on a Dart element.

Annotations provide additional metadata to elements using the @ syntax. This class provides access to the annotation's constant value and type, as well as convenience methods for checking common annotations from packages like 'meta'.

Implementers

Constructors

ElementAnnotation()

Properties

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

Methods

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