Contract for objects that support alias registration.
This interface allows a registry to associate multiple aliases with a single primary name. Aliases provide alternative identifiers for the same registered object, making the registry more flexible in terms of lookup.
Example
final registry = MyAliasRegistry();
// Register the primary name
registry.registerPrimary('userService');
// Register multiple aliases for the same service
registry.registerAlias('userService', 'accountService');
registry.registerAlias('userService', 'profileService');
// All names resolve to the same object
final service1 = registry.get('userService');
final service2 = registry.get('accountService');
final service3 = registry.get('profileService');
- Implementers
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
-
registerAlias(
String name, String alias) → void - Registers an alias for an existing name in the registry.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited