DslGenerator class
Aggregates DSL data from all modules and invokes registered
DslAwareCodeGenerator
implementations using a unified DslContext
.
This design avoids type branching and adheres to Open/Closed Principle by delegating DSL-specific logic to the generators themselves.
Note: adding new DSL types may require extending DslContext
,
which is considered an acceptable and localized compromise.
Constructors
- DslGenerator.new(CompositeWriteStrategy strategy, {required CliContext cliContext})
-
Creates a generator that aggregates DSLs and writes output via
strategy
.const
Properties
- cliContext → CliContext
-
Execution context with CLI-level preferences.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- strategy → CompositeWriteStrategy
-
Write strategy used for persisting generated files.
final
Methods
-
generate(
List< IModuleCodeContributor> modules, Logger logger, Map<String, dynamic> coreVars, String generateTo) → Future<void> -
Generates files based on provided modules and context.
override
-
mapMergeStrategy(
FileMergeStrategy strategy) → FileConflictResolution -
Maps a high-level
FileMergeStrategy
to a masonFileConflictResolution
.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