builder library
Classes
- AnnotatedElement
- Result of finding an annotation on element through LibraryReader.
- ConstantReader
-
A wrapper for analyzer's
DartObjectwith a predictable high-level API. - Generator
- A tool to generate Dart code based on a Dart library source.
-
GeneratorForAnnotation<
T> -
Extend this type to create a Generator that invokes
generateForAnnotatedElement for every top level element in the source file
annotated with
T. - LibraryBuilder
-
A
Builderwhich generates standalone Dart library files. - LibraryReader
-
A high-level wrapper API with common functionality for
LibraryElement. - PartBuilder
-
A
Builderwhich generatespart offiles. - Revivable
-
Decoded "instructions" for re-creating a const
DartObjectat runtime. -
A
Builderwhich generates content intended forpart offiles. - TypeChecker
- An abstraction around doing static type checking at compile/build time.
Constants
- defaultFileHeader → const String
Functions
-
customTokenBuilder(
BuilderOptions options) → Builder - FlyWind builder factory for YAML-based generation Uses source_gen utilities for better integration with the build system
-
spanForElement(
Element element, [SourceFile? file]) → SourceSpan -
Returns a source span that spans the location where
elementis defined. -
typeNameOf(
DartType type) → String -
Returns a non-null name for the provided
type.
Exceptions / Errors
- InvalidGenerationSource
- A description of a problem in the source input to code generation.
- UnresolvedAnnotationException
- Exception thrown when TypeChecker fails to resolve a metadata annotation.