|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.townleyenterprises.command.AbstractCommandListener com.townleyenterprises.command.DefaultCommandListener
This class allows boilerplate nested classes to be elimitated by providing all of the things supplied by the CommandListener interface as arguments to the constructor.
Constructor Summary | |
DefaultCommandListener(java.lang.String desc,
CommandOption[] opts)
The constructor is used to supply the arguments for the listener. |
Method Summary | |
java.lang.String |
getDescription()
This method is used to retrieve the description of the command listener's options when printing the help message. |
CommandOption[] |
getOptions()
This method is called by the CommandParser to determine all of the arguments that should be handled by the listener. |
Methods inherited from class com.townleyenterprises.command.AbstractCommandListener |
optionMatched |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultCommandListener(java.lang.String desc, CommandOption[] opts)
desc
- the descriptionopts
- the optionsMethod Detail |
public java.lang.String getDescription()
getDescription
in interface CommandListener
getDescription
in class AbstractCommandListener
public CommandOption[] getOptions()
getOptions
in interface CommandListener
getOptions
in class AbstractCommandListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |