ElementAnnotation class

A single annotation associated with an element.

Clients may not extend, implement or mix-in this class.

Constructors

ElementAnnotation()

Properties

constantValue DartObject
Return a representation of the value of this annotation. [...]
read-only
element Element
Return the element representing the field, variable, or const constructor being used as an annotation.
read-only
isAlwaysThrows → bool
Return true if this annotation marks the associated function as always throwing.
read-only
isDeprecated → bool
Return true if this annotation marks the associated element as being deprecated.
read-only
isFactory → bool
Return true if this annotation marks the associated member as a factory.
read-only
isImmutable → bool
Return true if this annotation marks the associated class and its subclasses as being immutable.
read-only
isIsTest → bool
Return true if this annotation marks the associated member as running a single test.
read-only
isIsTestGroup → bool
Return true if this annotation marks the associated member as running a test group.
read-only
isJS → bool
Return true if this annotation marks the associated element with the JS annotation.
read-only
isMustCallSuper → bool
Return true if this annotation marks the associated member as requiring overriding methods to call super.
read-only
isOverride → bool
Return true if this annotation marks the associated method as being expected to override an inherited method.
read-only
isProtected → bool
Return true if this annotation marks the associated member as being protected.
read-only
isProxy → bool
Return true if this annotation marks the associated class as implementing a proxy object.
read-only
isRequired → bool
Return true if this annotation marks the associated member as being required.
read-only
isVisibleForTemplate → bool
Return true if this annotation marks the associated member as being visible for template files.
read-only
isVisibleForTesting → bool
Return true if this annotation marks the associated member as being visible for testing.
read-only
context → AnalysisContext
Return the AnalysisContext which should be used to evaluate this constant.
read-only, inherited
hashCode → int
The hash code for this object.
read-only, inherited
librarySource → Source
If this target is associated with a library, return the source of the library's defining compilation unit; otherwise return null.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited
source → Source
Return the source associated with this target, or null if this target is not associated with a source.
read-only, inherited

Methods

computeConstantValue() DartObject
Return a representation of the value of this annotation, forcing the value to be computed if it had not previously been computed, or null if the value of this annotation could not be computed because of errors.
toSource() → String
Return a textual description of this annotation in a form approximating valid source. The returned string will not be valid source primarily in the case where the annotation itself is not well-formed.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

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

Constants

EMPTY_LIST → const List<ElementAnnotation>
An empty list of annotations.
const <ElementAnnotation>[]