CommandRegistry class
The shared command registry (FR-004, FR-005, FR-006).
A single in-memory registry holds every command every Zuraffa app has
registered in this process. Apps register commands at startup; the
registry deduplicates by RegistryKey. Cross-app invocation (FR-005)
looks up commands by (ownerApp, name) without compile-time coupling.
Constructors
Properties
Methods
-
clear(
) → void - Remove all registered commands. Useful for tests.
-
contains(
String ownerApp, String name) → bool -
Whether a command is registered under
(ownerApp, name). -
enumerate(
) → List< RegisteredCommand> - Enumerate every registered command, across all owner apps.
-
enumerateByName(
String name) → List< RegisteredCommand> -
Enumerate every command named
nameacross all owner apps — used to detect ambiguity when a caller invokes by name only (without specifying the owner app). If the result has more than one entry, the invocation is ambiguous and must be namespaced (FR-009). -
enumerateFor(
String ownerApp) → List< RegisteredCommand> -
Enumerate only the commands owned by
ownerApp. -
lookup(
String ownerApp, String name) → RegisteredCommand? -
Look up a command by
(ownerApp, name). -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
register(
StandardCommand command, {required String ownerApp, String version = '0.1.0'}) → void -
Register a command under
(ownerApp, command.name). -
require(
String ownerApp, String name) → RegisteredCommand - Look up a command, throwing UnknownCommandException if missing.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited