public abstract class CommandHandler
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
java.lang.String |
fcommand |
java.lang.String |
fcommandGrammar |
java.lang.String |
fexample |
java.lang.String |
finput |
java.util.List<java.lang.String> |
fnotes |
org.plumelib.options.Options |
foptions |
java.lang.String |
foutput |
java.lang.String |
fpitch |
java.lang.String |
fsummary |
java.lang.String |
fwhere |
| Modifier | Constructor and Description |
|---|---|
protected |
CommandHandler(java.lang.String command,
java.lang.String pitch,
java.lang.String commandGrammar,
java.lang.String where,
java.lang.String summary,
java.util.List<java.lang.String> notes,
java.lang.String input,
java.lang.String output,
java.lang.String example,
org.plumelib.options.Options options)
No arguments should be null.
|
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
handle(java.lang.String[] args) |
boolean |
handles(java.lang.String command)
Returns true if this CommandHandler handles the given command.
|
void |
printHTML(java.io.PrintStream out)
Prints out formatted text in (google code) Wiki format.
|
void |
usageMessage(java.io.PrintStream out) |
public java.lang.String fcommand
public java.lang.String fpitch
public java.lang.String fcommandGrammar
public java.lang.String fwhere
public java.lang.String fsummary
public java.util.List<java.lang.String> fnotes
public java.lang.String finput
public java.lang.String foutput
public java.lang.String fexample
public org.plumelib.options.Options foptions
protected CommandHandler(java.lang.String command,
java.lang.String pitch,
java.lang.String commandGrammar,
java.lang.String where,
java.lang.String summary,
java.util.List<java.lang.String> notes,
java.lang.String input,
java.lang.String output,
java.lang.String example,
org.plumelib.options.Options options)
command - the name of the commandpitch - the description of the commandcommandGrammar - the usage of the commandwhere - the wheresummary - the summary of the commandnotes - the notes for the commandinput - the inputoutput - the outputexample - the usage exampleoptions - the command line argumentspublic final boolean handles(java.lang.String command)
command - a commandpublic abstract boolean handle(java.lang.String[] args)
public final void printHTML(java.io.PrintStream out)
out - the output stream for printing html formatted usagepublic final void usageMessage(java.io.PrintStream out)