Target class
An annotation used on classes that are intended to be used as annotations to indicate the kinds of declarations and directives for which the annotation is appropriate.
The kinds are represented by the constants defined in TargetKind.
Tools, such as the analyzer, can provide feedback if
- the annotation is associated with anything other than a class, where the
class must be usable as an annotation (that is, contain at least one
const
constructor). - the annotated annotation is associated with anything other than the kinds of declarations listed as valid targets.
This type is not intended to be extended and will be marked as final
in a future release of package:meta
.
- Annotations
-
- @Target({TargetKind.classType})
Constructors
-
Target(Set<
TargetKind> kinds) -
Create a new instance of Target to be used as an annotation
on a class intended to be used as an annotation, with the
specified target kinds that it can be applied to.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
kinds
→ Set<
TargetKind> -
The kinds of declarations with which the annotated annotation can be
associated.
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.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited