|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.townleyenterprises.command.AbstractCommandListener
This class is intended to more easily support the implementation of command-line argument handler classes by providing an empty optionMatched method.
Constructor Summary | |
AbstractCommandListener()
|
Method Summary | |
abstract java.lang.String |
getDescription()
This method is used to retrieve the description of the command listener's options when printing the help message. |
abstract CommandOption[] |
getOptions()
This method is called by the CommandParser to determine all of the arguments that should be handled by the listener. |
void |
optionMatched(CommandOption opt,
java.lang.String arg)
This method is called whenever an arguement registered with the parser is detected in the argument stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AbstractCommandListener()
Method Detail |
public abstract java.lang.String getDescription()
getDescription
in interface CommandListener
public abstract CommandOption[] getOptions()
getOptions
in interface CommandListener
public void optionMatched(CommandOption opt, java.lang.String arg)
optionMatched
in interface CommandListener
opt
- the CommandOption matched by the parserarg
- the argument (if any) specified for the option
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |