GeneratorForAnnotatedClass<T> class
abstract
A generator that processes class elements with a specific annotation type.
This specialized generator only targets class elements and automatically handles filtering out non-class elements.
- Inheritance
-
- Object
- Generator
- GeneratorForAnnotationBase
- GeneratorForAnnotation<
T> - GeneratorForAnnotatedClass
Constructors
- GeneratorForAnnotatedClass.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.
override
-
generateForClass(
BuildStep buildStep, ClassElement element, ElementAnnotation annotation) → dynamic - Generates code for an annotated class element.
-
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