Package com.aspectran.shell.command
Class ShellCommandRegistry
- java.lang.Object
-
- com.aspectran.shell.command.ShellCommandRegistry
-
- All Implemented Interfaces:
CommandRegistry
public class ShellCommandRegistry extends java.lang.Object implements CommandRegistry
A registry that contains the commands known by a shell.Created: 2017. 10. 25.
-
-
Constructor Summary
Constructors Constructor Description ShellCommandRegistry(CommandInterpreter interpreter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCommand(java.lang.Class<? extends Command> commandClass)
void
addCommand(java.lang.String... classNames)
java.util.Collection<Command>
getAllCommands()
Command
getCommand(java.lang.Class<? extends Command> commandClass)
Command
getCommand(java.lang.String commandName)
CommandInterpreter
getInterpreter()
-
-
-
Constructor Detail
-
ShellCommandRegistry
public ShellCommandRegistry(CommandInterpreter interpreter)
-
-
Method Detail
-
getInterpreter
public CommandInterpreter getInterpreter()
- Specified by:
getInterpreter
in interfaceCommandRegistry
-
getCommand
public Command getCommand(java.lang.String commandName)
- Specified by:
getCommand
in interfaceCommandRegistry
-
getCommand
public Command getCommand(java.lang.Class<? extends Command> commandClass)
- Specified by:
getCommand
in interfaceCommandRegistry
-
getAllCommands
public java.util.Collection<Command> getAllCommands()
- Specified by:
getAllCommands
in interfaceCommandRegistry
-
addCommand
public void addCommand(java.lang.String... classNames)
-
addCommand
public void addCommand(java.lang.Class<? extends Command> commandClass)
-
-