GenerationTransaction class
Manages atomic file operations during generation.
Ensures that multiple file changes (writes, deletes, appends) are validated for conflicts and applied together, with rollback support on failure.
Constructors
- GenerationTransaction({required bool dryRun, bool force = false})
Properties
- dryRun → bool
-
final
- force → bool
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
operations
→ List<
FileOperation> -
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addOperation(
FileOperation operation) → void -
commit(
FileSystem fileSystem) → Future< TransactionResult> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
stampFeatureOwnership(
FeatureContract feature) → void -
Spec 1115 (issue #1115 item 2): stamps the
@XrayLayer+@FeatureOwneddecorators onto EVERY pending.dartcreate/update operation — the codegen is the WRITER of the persisted cross-layer knowledge (UseCase, Service, Repository, DataSource, View, Widget, Route emits all pass through here when a feature contract is active). The split derives from the file's project path (XrayLayerDecorators.forPath): presentation → skin, domain/data → engine, cross-cutting → shared. Idempotent — an anchor already present is kept as-is. -
toString(
) → String -
A string representation of this object.
inherited
-
validate(
FileSystem fileSystem) → Future< TransactionResult>
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- current → GenerationTransaction?
-
no setter
Static Methods
-
run<
T> (GenerationTransaction transaction, Future< T> action()) → Future<T>