Class CommandCatalog.DefaultCommandCatalog
java.lang.Object
org.springframework.shell.command.CommandCatalog.DefaultCommandCatalog
- All Implemented Interfaces:
CommandCatalog
- Enclosing interface:
- CommandCatalog
Default implementation of a
CommandCatalog
.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.shell.command.CommandCatalog
CommandCatalog.DefaultCommandCatalog
-
Method Summary
Modifier and TypeMethodDescriptionGets allCommandRegistration
s mapped with their names.void
register
(CommandRegistration... registration) Register aCommandRegistration
.void
unregister
(String... commandName) Unregister aCommandRegistration
by its command name.void
unregister
(CommandRegistration... registration) Unregister aCommandRegistration
.
-
Method Details
-
register
Description copied from interface:CommandCatalog
Register aCommandRegistration
.- Specified by:
register
in interfaceCommandCatalog
- Parameters:
registration
- the command registration
-
unregister
Description copied from interface:CommandCatalog
Unregister aCommandRegistration
.- Specified by:
unregister
in interfaceCommandCatalog
- Parameters:
registration
- the command registration
-
unregister
Description copied from interface:CommandCatalog
Unregister aCommandRegistration
by its command name.- Specified by:
unregister
in interfaceCommandCatalog
- Parameters:
commandName
- the command name
-
getRegistrations
Description copied from interface:CommandCatalog
Gets allCommandRegistration
s mapped with their names. Returned map is a copy and cannot be used to register new commands.- Specified by:
getRegistrations
in interfaceCommandCatalog
- Returns:
- all command registrations
-