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:

Constructors

ContextTranslatorRegistry()

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 translator under 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 source from its own version to target. If they are equal, returns source unchanged (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