public abstract class Check extends java.lang.Object implements OptionHandler, RevisionHandler
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
m_Debug
Debugging mode, gives extra output if true
|
protected boolean |
m_Silent
Silent mode, for no output at all to stdout
|
| Constructor and Description |
|---|
Check() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
doTests()
Begin the tests, reporting results to System.out
|
protected java.lang.Object |
forName(java.lang.String prefix,
java.lang.Class<?> cls,
java.lang.String classname,
java.lang.String[] options)
Tries to instantiate a new instance of the given class and checks whether
it is an instance of the specified class.
|
boolean |
getDebug()
Get whether debugging is turned on
|
java.lang.String[] |
getOptions()
Gets the current settings of the CheckClassifier.
|
boolean |
getSilent()
Get whether silent mode is turned on
|
java.util.Enumeration<Option> |
listOptions()
Returns an enumeration describing the available options.
|
protected void |
print(java.lang.Object msg)
prints the given message to stdout, if not silent mode
|
protected void |
println()
prints a LF to stdout, if not silent mode
|
protected void |
println(java.lang.Object msg)
prints the given message (+ LF) to stdout, if not silent mode
|
protected static void |
runCheck(Check check,
java.lang.String[] options)
runs the CheckScheme with the given options
|
void |
setDebug(boolean debug)
Set debugging mode
|
void |
setOptions(java.lang.String[] options)
Parses a given list of options.
|
void |
setSilent(boolean value)
Set slient mode, i.e., no output at all to stdout
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetRevisionprotected boolean m_Debug
protected boolean m_Silent
public java.util.Enumeration<Option> listOptions()
listOptions in interface OptionHandlerpublic void setOptions(java.lang.String[] options)
throws java.lang.Exception
setOptions in interface OptionHandleroptions - the list of options as an array of stringsjava.lang.Exception - if an option is not supportedpublic java.lang.String[] getOptions()
getOptions in interface OptionHandlerprotected java.lang.Object forName(java.lang.String prefix,
java.lang.Class<?> cls,
java.lang.String classname,
java.lang.String[] options)
throws java.lang.Exception
prefix - the classname prefix (without trailing dot)cls - the class to check whether the generated object is an instance
ofclassname - the classname to instantiateoptions - optional options for the objectjava.lang.Exception - if instantiation failspublic abstract void doTests()
public void setDebug(boolean debug)
debug - true if debug output should be printedpublic boolean getDebug()
public void setSilent(boolean value)
value - whether silent mode is active or notpublic boolean getSilent()
protected void print(java.lang.Object msg)
msg - the text to print to stdoutprotected void println(java.lang.Object msg)
msg - the message to println to stdoutprotected void println()
protected static void runCheck(Check check, java.lang.String[] options)
check - the checkscheme to setup and runoptions - the commandline parameters to use