org.naturalcli
Class Command

java.lang.Object
  extended by org.naturalcli.Command
Direct Known Subclasses:
ExecuteFileCommand, HelpCommand, HTMLHelpCommand, NullCommand, SleepCommand

public class Command
extends java.lang.Object

Represents a command definition

Author:
Ferran Busquets

Constructor Summary
Command(java.lang.String syntax, java.lang.String help, ICommandExecutor ce)
          Constructs a new command.
 
Method Summary
 ICommandExecutor getExecutor()
          Get the executor for the command.
 java.lang.String getHelp()
          Returns the help for the commend.
 Syntax getSyntax()
          Returns a string with the syntax for the command.
 boolean isHidden()
          Determine if this is a hidden command.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Command

public Command(java.lang.String syntax,
               java.lang.String help,
               ICommandExecutor ce)
        throws InvalidSyntaxException
Constructs a new command.

Parameters:
syntax - the syntax for the command.
helpthe - help help of the command.
ce - command executor.
Throws:
InvalidSyntaxDefinionException.
InvalidSyntaxException
Method Detail

isHidden

public boolean isHidden()
Determine if this is a hidden command.

Returns:
true if it's a hidden command, false if not.

getSyntax

public Syntax getSyntax()
Returns a string with the syntax for the command.

Returns:
A string with the syntax for the command.

getHelp

public java.lang.String getHelp()
Returns the help for the commend.

Returns:
The help for the command.

getExecutor

public ICommandExecutor getExecutor()
Get the executor for the command.

Returns:
the executor.