| java.lang.Object org.naturalcli.Command
All known Subclasses: org.naturalcli.commands.NullCommand, org.naturalcli.commands.HelpCommand, org.naturalcli.commands.ExecuteFileCommand, org.naturalcli.commands.HTMLHelpCommand, org.naturalcli.commands.SleepCommand,
Command | public class Command (Code) | | Represents a command definition
author: Ferran Busquets |
Constructor Summary | |
public | Command(String syntax, String help, ICommandExecutor ce) Constructs a new command.
Parameters: syntax - the syntax for the command. Parameters: helpthe - help help of the command. Parameters: ce - command executor. | protected | Command() Default constructor only for inheritors. |
Method Summary | |
public ICommandExecutor | getExecutor() Get the executor for the command. | public String | getHelp() Returns the help for the commend. | public Syntax | getSyntax() Returns a string with the syntax for the command. | public boolean | isHidden() Determine if this is a hidden command. | protected void | prepare(String syntax, String help, ICommandExecutor ce) Initialize the command.
Parameters: syntax - the syntax for the command. Parameters: helpthe - help help of the command. Parameters: ce - command executor. |
Command | public Command(String syntax, String help, ICommandExecutor ce) throws InvalidSyntaxException(Code) | | Constructs a new command.
Parameters: syntax - the syntax for the command. Parameters: helpthe - help help of the command. Parameters: ce - command executor. InvalidSyntaxDefinionException. |
Command | protected Command()(Code) | | Default constructor only for inheritors.
|
getHelp | public String getHelp()(Code) | | Returns the help for the commend.
The help for the command. |
getSyntax | public Syntax getSyntax()(Code) | | Returns a string with the syntax for the command.
A string with the syntax for the command. |
isHidden | public boolean isHidden()(Code) | | Determine if this is a hidden command.
true if it's a hidden command, false if not. |
prepare | protected void prepare(String syntax, String help, ICommandExecutor ce) throws InvalidSyntaxException(Code) | | Initialize the command.
Parameters: syntax - the syntax for the command. Parameters: helpthe - help help of the command. Parameters: ce - command executor. InvalidSyntaxDefinionException. |
|
|