TargetKind enum Null safety
An enumeration of the kinds of targets to which an annotation can be applied.
Constructors
- TargetKind()
-
const
Values
- classType → const TargetKind
-
Indicates that an annotation is valid on any class declaration.
const TargetKind(0)
- enumType → const TargetKind
-
Indicates that an annotation is valid on any enum declaration.
const TargetKind(1)
- extension → const TargetKind
-
Indicates that an annotation is valid on any extension declaration.
const TargetKind(2)
- field → const TargetKind
-
Indicates that an annotation is valid on any field declaration, both instance and static fields, whether it's in a class, mixin or extension.
const TargetKind(3)
- function → const TargetKind
-
Indicates that an annotation is valid on any top-level function declaration.
const TargetKind(4)
- library → const TargetKind
-
Indicates that an annotation is valid on the first directive in a library, whether that's a
library
,import
,export
orpart
directive. This doesn't include thepart of
directive in a part file.const TargetKind(5)
- getter → const TargetKind
-
Indicates that an annotation is valid on any getter declaration, both instance or static getters, whether it's in a class, mixin, extension, or at the top-level of a library.
const TargetKind(6)
- method → const TargetKind
-
Indicates that an annotation is valid on any method declaration, both instance and static methods, whether it's in a class, mixin or extension.
const TargetKind(7)
- mixinType → const TargetKind
-
Indicates that an annotation is valid on any mixin declaration.
const TargetKind(8)
- parameter → const TargetKind
-
Indicates that an annotation is valid on any formal parameter declaration, whether it's in a function, method, constructor, or closure.
const TargetKind(9)
- setter → const TargetKind
-
Indicates that an annotation is valid on any setter declaration, both instance or static setters, whether it's in a class, mixin, extension, or at the top-level of a library.
const TargetKind(10)
- topLevelVariable → const TargetKind
-
Indicates that an annotation is valid on any top-level variable declaration.
const TargetKind(11)
- type → const TargetKind
-
Indicates that an annotation is valid on any declaration that introduces a type. This includes classes, enums, mixins and typedefs, but does not include extensions because extensions don't introduce a type.
const TargetKind(12)
- typedefType → const TargetKind
-
Indicates that an annotation is valid on any typedef declaration.
const TargetKind(13)
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
values
→ const List<
TargetKind> -
A constant List of the values in this enum, in order of their declaration.
[classType, enumType, extension, field, function, library, getter, method, mixinType, parameter, setter, topLevelVariable, type, typedefType]