TargetKind enum

An enumeration of the kinds of targets to which an annotation can be applied.

Inheritance

Constructors

TargetKind()
const

Values

classType → const TargetKind

Indicates that an annotation is valid on any class declaration.

enumType → const TargetKind

Indicates that an annotation is valid on any enum declaration.

extension → const TargetKind

Indicates that an annotation is valid on any extension declaration.

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.

function → const TargetKind

Indicates that an annotation is valid on any top-level function declaration.

library → const TargetKind

Indicates that an annotation is valid on the first directive in a library, whether that's a library, import, export or part directive. This doesn't include the part of directive in a part file.

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.

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.

mixinType → const TargetKind

Indicates that an annotation is valid on any mixin declaration.

parameter → const TargetKind

Indicates that an annotation is valid on any formal parameter declaration, whether it's in a function, method, constructor, or closure.

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.

topLevelVariable → const TargetKind

Indicates that an annotation is valid on any top-level variable declaration.

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.

typedefType → const TargetKind

Indicates that an annotation is valid on any typedef declaration.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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

Constants

values → const List<TargetKind>
A constant List of the values in this enum, in order of their declaration.