BuilderEntry class abstract

An abstract class representing a builder configuration and its execution context.

BuilderEntry defines the interface for configuring and executing builders during the build process. It encapsulates:

  • The builder's unique identifier
  • Its output configuration (cache vs in-source)
  • Filtering rules for which files it should process
  • Dependency relationships with other builders
  • Methods for builder execution and preparation

This abstraction allows the build system to handle different types of builders (standard builders, shared part builders, library builders) with a unified API.

Implementers

Constructors

BuilderEntry.new(String key, BuilderFactory builder, {bool generateToCache, Set<String> generateFor, Set<String> runsBefore, Map<String, dynamic> options, Map<Type, String> registeredTypes, Set<String> applies})
Creates a BuilderEntry with a standard builder.
factory
BuilderEntry.forLibrary(String key, GeneratorFactory generator, {bool generateToCache, Set<String> generateFor, Set<String> runsBefore, Map<String, dynamic> options, Map<Type, String> registeredTypes, bool allowSyntaxErrors, Set<String> applies, required Set<String> outputExtensions})
Creates a BuilderEntry with a library builder.
factory
BuilderEntry.forSharedPart(String key, GeneratorFactory generator, {bool generateToCache, Set<String> generateFor, Set<String> runsBefore, Map<String, dynamic> options, Map<Type, String> registeredTypes, bool allowSyntaxErrors, Set<String> applies})
Creates a BuilderEntry with a shared part builder.
factory

Properties

applies Set<String>
A set of builder keys that this builder applies to.
no setter
generateFor Set<String>
A set of glob patterns that determine which files this builder should process.
no setter
generateToCache bool
Whether outputs should be generated to a cache directory.
no setter
hashCode int
The hash code for this object.
no setterinherited
key String
A unique identifier for this builder.
no setter
outputExtensions Set<String>
The file extensions this builder will generate.
no setter
runsBefore Set<String>
A set of builder keys that this builder should run before.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

build(ResolverImpl resolver, Asset asset) FutureOr<Set<Uri>>
Builds the given asset using this builder.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onPrepare(ResolverImpl resolver) → void
Prepares the resolver for this builder.
shouldGenerateFor(BuildCandidate candidate) bool
Determines whether this builder should generate output for the given candidate.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited