ContextTranslatorRegistry class
A simple registry of translators keyed by (from, to).
How it works
The registry is per-graph, matching VersionRegistry's scoping. Translators registered on one graph do not affect another.
See also:
- ContextTranslator — what this registry stores.
- CellGraphTranslators — the per-graph accessor.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- 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
-
register(
ContextTranslator translator) → void -
Registers a
translatorunder its(from, to)pair. -
resolve(
{required String from, required String to}) → ContextTranslator? -
toString(
) → String -
A string representation of this object.
inherited
-
translate(
DeputyContext source, {required String target}) → Future< DeputyContext> -
Translates
sourcefrom its own version totarget. If they are equal, returnssourceunchanged (no translation needed). If no translator is registered, throws UnimplementedError — a loud failure rather than a silent cross-version guess.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited