public class Shell extends Object
Shell is the shell object provided by Ash.| Constructor and Description |
|---|
Shell() |
| Modifier and Type | Method and Description |
|---|---|
Map<String,Command> |
commands()
Returns the command map registered in the shell.
|
Console |
console() |
void |
exec(String line)
Executes the specified command line input.
|
void |
register(Command command)
Registers the specified command instance into the shell.
|
void |
register(String name,
Command command)
Registers the specified command instance into the shell with the specified name.
|
void |
start()
Runs into the REPL mode.
|
boolean |
started() |
void |
stop()
Quit from the REPL mode.
|
void |
unregister(String name)
Unregisters the command corresponding to the specified name from the shell.
|
public void register(Command command)
command - Command to be registered.public void register(String name, Command command)
name - Name of command.command - Command to be registered.public void unregister(String name)
name - Name of command.public Map<String,Command> commands()
public void exec(String line)
line - Command line input.public void start()
public void stop()
public boolean started()
public Console console()
Copyright © 2014-2019 Eiichiro Uchiumi. All Rights Reserved.