MergeConflict class final

Thrown when two values for a key cannot be merged.

A MergePolicy throws it without origins; the socket that merges the contributions adds them, so the pipeline can name, or in lenient mode drop, the module at fault.

Implemented types

Constructors

MergeConflict(String key, Object existing, Object incoming, String reason, {ContributionOrigin? existingOrigin, ContributionOrigin? incomingOrigin})
Creates a conflict between existing and incoming for key.
const

Properties

existing → Object
The value merged from the earlier contributions.
final
existingOrigin → ContributionOrigin?
Who contributed existing, if known.
final
hashCode → int
The hash code for this object.
no setterinherited
incoming → Object
The value that could not be merged into existing.
final
incomingOrigin → ContributionOrigin?
Who contributed incoming, if known.
final
key → String
The key both values were contributed for.
final
reason → String
Why the values cannot be merged.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override
withOrigins({required ContributionOrigin? existing, required ContributionOrigin? incoming}) → MergeConflict
Returns a copy of this conflict with the origins of both values.

Operators

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