GeneratorForAnnotationBase class abstract
Base class for generators that process elements with specific annotations.
This abstract class provides core functionality for finding annotated elements in a library and generating code for them.
- Inheritance
- Implementers
Constructors
- GeneratorForAnnotationBase.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.
final
Methods
-
buildTypeChecker(
Resolver resolver) → TypeChecker - Creates a TypeChecker for this generator's annotation type.
-
generate(
LibraryElement library, BuildStep buildStep) → FutureOr< String> -
Generates Dart code for an input Dart library.
override
-
generateForAnnotatedElement(
BuildStep buildStep, Element element, ElementAnnotation annotation) → dynamic - Generates code for a single annotated element.
-
getTypeChecker(
BuildStep buildStep) → TypeChecker - Gets a TypeChecker for this generator's annotation type.
-
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