public interface CommandCatalog
CommandRegistration
s.Modifier and Type | Interface and Description |
---|---|
static class |
CommandCatalog.DefaultCommandCatalog
Default implementation of a
CommandCatalog . |
Modifier and Type | Method and Description |
---|---|
Map<String,CommandRegistration> |
getRegistrations()
Gets all
CommandRegistration s mapped with their names. |
static CommandCatalog |
of()
Gets an instance of a default
CommandCatalog . |
static CommandCatalog |
of(Collection<CommandResolver> resolvers,
ShellContext shellContext)
Gets an instance of a default
CommandCatalog . |
void |
register(CommandRegistration... registration)
Register a
CommandRegistration . |
void |
unregister(CommandRegistration... registration)
Unregister a
CommandRegistration . |
void |
unregister(String... commandName)
Unregister a
CommandRegistration by its command name. |
void register(CommandRegistration... registration)
CommandRegistration
.registration
- the command registrationvoid unregister(CommandRegistration... registration)
CommandRegistration
.registration
- the command registrationvoid unregister(String... commandName)
CommandRegistration
by its command name.commandName
- the command nameMap<String,CommandRegistration> getRegistrations()
CommandRegistration
s mapped with their names.
Returned map is a copy and cannot be used to register new commands.static CommandCatalog of()
CommandCatalog
.static CommandCatalog of(Collection<CommandResolver> resolvers, ShellContext shellContext)
CommandCatalog
.resolvers
- the command resolversshellContext
- the shell contextCopyright © 2024. All rights reserved.