| Constructor and Description |
|---|
CommandDelegate()
Create new object.
|
CommandDelegate(Command command)
Create new object.
|
| Modifier and Type | Method and Description |
|---|---|
Command |
execute(PrintWriter writer,
BufferedReader reader)
Execute the command.
|
Command |
getCommand()
Get the command to delegate calls.
|
CommandRunner |
getCommandRunner()
Get the command runner.
|
Context |
getContext()
Get the command context.
|
Command |
getParentCommand()
Get the parent command.
|
<T extends Command> |
getParentCommand(Class<T> clazz)
Get the parent command with the specified class.
|
boolean |
hasParentCommand()
Check if this command has the parent command.
|
<T extends Command> |
hasParentCommand(Class<T> clazz)
Check if this command has the parent command with the specified class.
|
void |
reset()
Reset the command state.
|
void |
setCommand(Command command)
Set the command to delegate calls.
|
void |
setCommandRunner(CommandRunner commandRunner)
Set the command runner.
|
void |
setContext(Context context)
Set the command context.
|
public CommandDelegate()
public CommandDelegate(Command command)
command - the command to delegate calls.public Command getCommand()
public void setCommand(Command command)
command - the command to delegate calls.public boolean hasParentCommand()
CommandhasParentCommand in interface Commandpublic <T extends Command> boolean hasParentCommand(Class<T> clazz)
CommandhasParentCommand in interface CommandT - the generic type of the specified class.clazz - the specified class.public Command getParentCommand()
CommandgetParentCommand in interface Commandpublic <T extends Command> Command getParentCommand(Class<T> clazz)
CommandgetParentCommand in interface CommandT - the generic type of the specified class.clazz - the specified class.public Context getContext()
CommandgetContext in interface Commandpublic void setContext(Context context)
CommandsetContext in interface Commandcontext - the command context.public CommandRunner getCommandRunner()
CommandgetCommandRunner in interface Commandpublic void setCommandRunner(CommandRunner commandRunner)
CommandsetCommandRunner in interface CommandcommandRunner - the command runner.public Command execute(PrintWriter writer, BufferedReader reader)
CommandCopyright © 2019. All rights reserved.