org.enhydra.xml.xmlc.commands.options
Class BooleanOption
java.lang.Object
|
+--org.enhydra.xml.xmlc.commands.options.Option
|
+--org.enhydra.xml.xmlc.commands.options.BooleanOption
- public abstract class BooleanOption
- extends Option
An option that takes a boolean value of true/false/yes/no.
Constructor Summary |
BooleanOption(java.lang.String name,
java.lang.String help)
Construct a new object. |
Method Summary |
void |
parse(java.lang.String[] args,
ErrorReporter errorReporter,
java.lang.Object clientData)
Parse an instance of the option and set the field in the Options
object using Java reflection. |
protected abstract void |
set(boolean value,
java.lang.Object clientData)
Method called to set the value. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
BooleanOption
public BooleanOption(java.lang.String name,
java.lang.String help)
- Construct a new object.
- Parameters:
name
- The name of the option.help
- Help string for the option.
set
protected abstract void set(boolean value,
java.lang.Object clientData)
throws XMLCException
- Method called to set the value.
XMLCException
parse
public void parse(java.lang.String[] args,
ErrorReporter errorReporter,
java.lang.Object clientData)
throws XMLCException
- Parse an instance of the option and set the field in the Options
object using Java reflection.
- Specified by:
parse
in class Option
- Parameters:
args
- The option's arguments.errorReporter
- Used to report warnings, such as deprecated
options. Errors should be thrown.clientData
- Object that is passed to the parser. Normally
contains the object to store the configuration in.
XMLCException
Copyright © 1999-2002 enhydra.org (Mark Diekhans, David Li, Richard Kunze). All Rights reserved.