GateRegistry class
A registry for managing gate callbacks.
This allows registering, unregistering, and resolving gate callbacks by their ability names.
Properties
-
abilities
→ Iterable<
String> -
Returns a list of all registered ability names.
no setter
-
entries
→ Map<
String, GateCallback> -
Provides direct access to the internal map of entries.
no setterinherited
-
entryNames
→ Iterable<
String> -
An iterable of all entry names in the registry.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clearEntries(
) → void -
Clears all entries from the registry.
inherited
-
containsEntry(
String name) → bool -
Checks if an entry with the given
nameexists in the registry.inherited -
duplicateDiagnostics(
String name) → String -
Generates diagnostic information for duplicate entries with the given
name.inherited -
entryOrigin(
String name) → StackTrace? -
Retrieves the stack trace of the original registration for the given
name.inherited -
getEntry(
String name) → GateCallback? -
Retrieves the entry associated with the given
name.inherited -
normalizeName(
String name) → String -
Normalizes the given
nameby trimming and converting it to lowercase. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onDuplicate(
String name, GateCallback existing, bool overrideExisting) → bool -
Handles duplicate entries with the given
nameandexistingvalue. -
register(
String ability, GateCallback callback) → void -
Registers a new gate callback for the given
ability. -
registerAll(
Map< String, GateCallback> entries) → void -
Registers multiple gate callbacks from the given
entries. -
registerEntry(
String name, GateCallback value, {bool overrideExisting = true}) → bool -
Registers an entry with the given
nameandvalue.inherited -
resolve(
String ability) → GateCallback? -
Resolves the gate callback for the given
ability. -
toString(
) → String -
A string representation of this object.
inherited
-
unregister(
String ability) → void -
Unregisters the gate callback for the given
ability. -
unregisterEntry(
String name) → bool -
Unregisters the entry with the given
name.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → GateRegistry
-
The singleton instance of GateRegistry.
final