public class CheckOptionHandler extends Check
CheckOptionHandler -W optionHandlerClassName -- test options
Valid options are:
-D Turn on debugging output.
-S Silent mode - prints nothing to stdout.
-W Full name of the OptionHandler analysed. eg: weka.classifiers.rules.ZeroR (default weka.classifiers.rules.ZeroR)
Options specific to option handler weka.classifiers.rules.ZeroR:
-D If set, classifier is run in debug mode and may output additional info to the consoleOptions after -- are used as user options in testing the OptionHandler
| Modifier and Type | Field and Description |
|---|---|
protected OptionHandler |
m_OptionHandler
the optionhandler to test
|
protected boolean |
m_Success
whether the tests were successful
|
protected java.lang.String[] |
m_UserOptions
the user-supplied options
|
| Constructor and Description |
|---|
CheckOptionHandler() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkCanonicalUserOptions()
checks whether the user-supplied options stay the same after settting,
getting and re-setting again
|
boolean |
checkDefaultOptions()
checks whether the default options can be processed completely or some
invalid options are returned by the getOptions() method.
|
boolean |
checkListOptions()
checks whether the listOptions method works
|
boolean |
checkRemainingOptions()
checks whether the user-supplied options can be processed completely or
some "left-over" options remain
|
boolean |
checkResettingOptions()
checks whether the optionhandler can be re-setted again to default options
after the user-supplied options have been set.
|
boolean |
checkSetOptions()
checks whether the user-supplied options can be processed at all
|
protected void |
compareOptions(java.lang.String[] options1,
java.lang.String[] options2)
Compares the two given sets of options.
|
void |
doTests()
Runs some diagnostic tests on an optionhandler object.
|
protected java.lang.String[] |
getCopy(java.lang.String[] options)
creates a copy of the given options
|
protected OptionHandler |
getDefaultHandler()
returns a new instance of the OptionHandler's class
|
protected java.lang.String[] |
getDefaultOptions()
returns the default options the default OptionHandler will return
|
OptionHandler |
getOptionHandler()
Get the OptionHandler used in the tests.
|
java.lang.String[] |
getOptions()
Gets the current settings of the CheckClassifier.
|
java.lang.String |
getRevision()
Returns the revision string.
|
boolean |
getSuccess()
returns the success of the tests
|
java.lang.String[] |
getUserOptions()
Gets the current user-supplied options (creates a copy)
|
java.util.Enumeration<Option> |
listOptions()
Returns an enumeration describing the available options.
|
static void |
main(java.lang.String[] args)
Main method for using the CheckOptionHandler.
|
protected java.lang.String |
printOptions(java.lang.String[] options)
Prints the given options to a string.
|
void |
setOptionHandler(OptionHandler value)
Set the OptionHandler to work on..
|
void |
setOptions(java.lang.String[] options)
Parses a given list of options.
|
void |
setUserOptions(java.lang.String[] value)
Sets the user-supplied options (creates a copy)
|
protected OptionHandler m_OptionHandler
protected java.lang.String[] m_UserOptions
protected boolean m_Success
public java.util.Enumeration<Option> listOptions()
listOptions in interface OptionHandlerlistOptions in class Checkpublic void setOptions(java.lang.String[] options)
throws java.lang.Exception
-D Turn on debugging output.
-S Silent mode - prints nothing to stdout.
-W Full name of the OptionHandler analysed. eg: weka.classifiers.rules.ZeroR (default weka.classifiers.rules.ZeroR)
Options specific to option handler weka.classifiers.rules.ZeroR:
-D If set, classifier is run in debug mode and may output additional info to the console
setOptions in interface OptionHandlersetOptions in class Checkoptions - the list of options as an array of stringsjava.lang.Exception - if an option is not supportedpublic java.lang.String[] getOptions()
getOptions in interface OptionHandlergetOptions in class Checkpublic void setOptionHandler(OptionHandler value)
value - the OptionHandler to use.public OptionHandler getOptionHandler()
public void setUserOptions(java.lang.String[] value)
value - the user-supplied options to usepublic java.lang.String[] getUserOptions()
public boolean getSuccess()
protected java.lang.String printOptions(java.lang.String[] options)
options - the options to be joinedprotected void compareOptions(java.lang.String[] options1,
java.lang.String[] options2)
throws java.lang.Exception
options1 - the first set of optionsoptions2 - the second set of optionsjava.lang.Exception - if the two sets of options differprotected java.lang.String[] getCopy(java.lang.String[] options)
options - the options to copyprotected OptionHandler getDefaultHandler()
protected java.lang.String[] getDefaultOptions()
public boolean checkListOptions()
public boolean checkSetOptions()
public boolean checkDefaultOptions()
public boolean checkRemainingOptions()
public boolean checkCanonicalUserOptions()
public boolean checkResettingOptions()
public void doTests()
public java.lang.String getRevision()
public static void main(java.lang.String[] args)
args - the options to the CheckOptionHandler