public class MutableCommandRegistry extends java.lang.Object implements CommandRegistry
| Modifier and Type | Field and Description |
|---|---|
private CommandContainerBuilder |
containerBuilder |
private static java.util.logging.Logger |
LOGGER |
private java.util.Map<java.lang.String,CommandContainer<Command>> |
registry |
| Constructor and Description |
|---|
MutableCommandRegistry() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAllCommandContainers(java.util.List<CommandContainer> commands) |
void |
addAllCommands(java.util.List<Command> commands) |
void |
addCommand(java.lang.Class<? extends Command> command) |
void |
addCommand(Command command) |
void |
addCommand(CommandContainer container) |
void |
completeCommandName(CompleteOperation co)
Based on input, find all commands that match or partly match
|
java.util.Set<java.lang.String> |
getAllCommandNames() |
private CommandContainerBuilder |
getBuilder() |
CommandContainer |
getCommand(java.lang.String name,
java.lang.String line) |
private void |
putIntoRegistry(CommandContainer commandContainer) |
void |
removeCommand(java.lang.String name) |
void |
setCommandContainerBuilder(CommandContainerBuilder containerBuilder) |
private final java.util.Map<java.lang.String,CommandContainer<Command>> registry
private CommandContainerBuilder containerBuilder
private static final java.util.logging.Logger LOGGER
public void setCommandContainerBuilder(CommandContainerBuilder containerBuilder)
public CommandContainer getCommand(java.lang.String name, java.lang.String line) throws CommandNotFoundException
getCommand in interface CommandRegistryname - command nameline - current terminal buffer lineCommandNotFoundExceptionpublic void completeCommandName(CompleteOperation co)
CommandRegistrycompleteCommandName in interface CommandRegistrypublic java.util.Set<java.lang.String> getAllCommandNames()
getAllCommandNames in interface CommandRegistrypublic void addCommand(CommandContainer container)
public void addCommand(Command command)
public void addCommand(java.lang.Class<? extends Command> command)
public void addAllCommands(java.util.List<Command> commands)
public void addAllCommandContainers(java.util.List<CommandContainer> commands)
private void putIntoRegistry(CommandContainer commandContainer)
public void removeCommand(java.lang.String name)
removeCommand in interface CommandRegistryprivate CommandContainerBuilder getBuilder()