TargetKind class

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

This type is not intended to be extended and will be marked as final in a future release of package:meta.

Properties

displayString String
A user visible string used to describe this target kind.
final
hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setter
name String
The name of the TargetKind value.
final
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.
override

Operators

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

Constants

classType → const TargetKind
Indicates that an annotation is valid on any class declaration.
constructor → const TargetKind
Indicates that an annotation is valid on any constructor declaration, both factory and generative constructors, whether it's in a class, enum, or extension type. Extension type primary constructors are not supported, because there is no way to annotate a primary constructor.
directive → const TargetKind
Indicates that an annotation is valid on any directive in a library or part file, whether it's a library, import, export, part, or part of directive.
enumType → const TargetKind
Indicates that an annotation is valid on any enum declaration.
enumValue → const TargetKind
Indicates that an annotation is valid on any enum value declaration.
extension → const TargetKind
Indicates that an annotation is valid on any extension declaration.
extensionType → const TargetKind
Indicates that an annotation is valid on any extension type 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, enum, mixin, or extension.
function → const TargetKind
Indicates that an annotation is valid on any top-level function declaration.
getter → const TargetKind
Indicates that an annotation is valid on any getter declaration, both instance or static getters, whether it's in a class, enum, mixin, extension, extension type, or at the top-level of a library.
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.
method → const TargetKind
Indicates that an annotation is valid on any method declaration, both instance and static methods, whether it's in a class, enum, mixin, extension, or extension type.
mixinType → const TargetKind
Indicates that an annotation is valid on any mixin declaration.
optionalParameter → const TargetKind
Indicates that an annotation is valid on any optional formal parameter declaration, whether it's in a constructor, function (named or anonymous), function type, function-typed formal parameter, or method.
overridableMember → const TargetKind
Indicates that an annotation is valid on any overridable instance member declaration, whether it's in a class, enum, extension type, or mixin. This includes instance fields, getters, setters, methods, and operators.
parameter → const TargetKind
Indicates that an annotation is valid on any formal parameter declaration, whether it's in a constructor, function (named or anonymous), function type, function-typed formal parameter, or method.
setter → const TargetKind
Indicates that an annotation is valid on any setter declaration, both instance or static setters, whether it's in a class, enum, mixin, extension, extension type, 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.
typeParameter → const TargetKind
Indicates that an annotation is valid on any type parameter declaration, whether it's on a class, enum, function type, function, mixin, extension, extension type, or typedef.
values → const List<TargetKind>
All current TargetKind values of targets to which an annotation can be applied.