ModuleRegistry class final

The modules the CLI offers and the roles they declare, checked against the rules of the module model.

The registry is checked once, before the command line is parsed, because the options of the roles become options of the command.

Constructors

ModuleRegistry(List<SmfModule> modules)
Creates the registry of modules.
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
ids → Iterable<ModuleId>
The ids of all modules.
no setter
modules → List<SmfModule>
The modules, in the order the CLI offers them.
final
openRoles → Set<Role<Object>>
The roles that every module may use without declaring them; see Role.openToAllModules.
no setter
roles → List<Role<Object>>
Every role the modules declare, directly or through other roles, in the order of first appearance.
final
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
providersOf(Role<Object> role) → List<SmfModule>
The modules that provide role, in registry order.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited
operator [](ModuleId id) → SmfModule?
The module id, or null if it is not registered.

Static Methods

problemsOf(List<SmfModule> modules) → List<String>
Describes what is wrong with a registry of modules, or returns an empty list.
rolesOf(List<SmfModule> modules) → List<Role<Object>>
Every role modules declare, directly or through other roles, in the order of first appearance.