GeneratorForAnnotation<T> class abstract

A generator that processes elements with a specific annotation type.

This class uses generic type parameters to specify the annotation type, making it easier to create generators for specific annotations.

Inheritance
Implementers

Constructors

GeneratorForAnnotation.new({bool throwOnUnresolved = false})
Creates a generator for processing elements with specific annotations.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
throwOnUnresolved bool
Whether to throw an exception if no annotated elements are found.
finalinherited

Methods

buildTypeChecker(Resolver resolver) TypeChecker
Creates a TypeChecker for this generator's annotation type.
override
generate(LibraryElement library, BuildStep buildStep) FutureOr<String>
Generates Dart code for an input Dart library.
inherited
generateForAnnotatedElement(BuildStep buildStep, Element element, ElementAnnotation annotation) → dynamic
Generates code for a single annotated element.
inherited
getTypeChecker(BuildStep buildStep) TypeChecker
Gets a TypeChecker for this generator's annotation type.
inherited
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