org.xnap.cmdl
Class AbstractCommand
java.lang.Object
org.xnap.cmdl.AbstractCommand
- All Implemented Interfaces:
- Command
- Direct Known Subclasses:
- AbstractBanCommand, AbstractIgnoreCommand, AbstractIgnoreUserCommand, AbstractMeCommand, AbstractMessageCommand, AbstractPartChannelCommand, JoinChannelCommand, OpenNapBanListCommand, OpenNapRegisterUserCommand
public abstract class AbstractCommand
- extends java.lang.Object
- implements Command
Method Summary |
java.lang.String[] |
getAliases()
Returns a list of aliases that can be used to call this command. |
java.lang.String |
getCommand()
Returns a string that represent this command. |
protected int |
getInt(java.lang.String[] argv,
int min,
int max)
|
java.lang.String |
getLongHelp()
Returns a long help text for this command. |
java.lang.String |
getParameter()
Returns a regular expression that describes the expected parameters. |
java.lang.String |
getShortHelp()
Returns a short (less than 80 characters) help text for this command. |
protected void |
putValue(java.lang.String key,
java.lang.Object value)
|
protected java.lang.String[] |
tokenize(java.lang.String command)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractCommand
public AbstractCommand()
getAliases
public java.lang.String[] getAliases()
- Description copied from interface:
Command
- Returns a list of aliases that can be used to call this command.
- Specified by:
getAliases
in interface Command
getCommand
public java.lang.String getCommand()
- Description copied from interface:
Command
- Returns a string that represent this command.
- Specified by:
getCommand
in interface Command
getLongHelp
public java.lang.String getLongHelp()
- Description copied from interface:
Command
- Returns a long help text for this command.
- Specified by:
getLongHelp
in interface Command
getParameter
public java.lang.String getParameter()
- Description copied from interface:
Command
- Returns a regular expression that describes the expected parameters.
- Specified by:
getParameter
in interface Command
getShortHelp
public java.lang.String getShortHelp()
- Description copied from interface:
Command
- Returns a short (less than 80 characters) help text for this command.
- Specified by:
getShortHelp
in interface Command
tokenize
protected java.lang.String[] tokenize(java.lang.String command)
putValue
protected void putValue(java.lang.String key,
java.lang.Object value)
getInt
protected int getInt(java.lang.String[] argv,
int min,
int max)
throws SyntaxException,
ParameterException
- Throws:
SyntaxException
ParameterException
Copyright © 2001-2005 XNap Team. All Rights Reserved.