|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectsofya.base.Handler
sofya.tools.th.TestHistoryHandler
public class TestHistoryHandler
The TestHistoryHandler provides methods to manipulate Galileo test history files and manage test histories for methods.
TestHistory,
TestHistoryViewer| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface sofya.base.SConstants |
|---|
SConstants.BlockLabel, SConstants.BlockObjectType, SConstants.BlockSubType, SConstants.BlockType, SConstants.BranchObjectType, SConstants.BranchType, SConstants.EDObjectType, SConstants.TraceObjectType |
| Field Summary |
|---|
| Fields inherited from class sofya.base.Handler |
|---|
HANDLER_EXTENSIONS, LINE_SEP |
| Fields inherited from interface sofya.base.SConstants |
|---|
DEFAULT_PORT, INST_COMPATIBLE, INST_OLD_UNSUPPORTED, INST_OPT_NORMAL, INST_OPT_SEQUENCE, SIG_CHKALIVE, SIG_ECHO |
| Constructor Summary | |
|---|---|
TestHistoryHandler()
Default constructor, creates a test history handler with no test histories yet registered. |
|
TestHistoryHandler(int typeFlags)
Standard constructor, creates a test history handler which will indicate that the test history stores information for the given block types. |
|
| Method Summary | |
|---|---|
boolean |
containsTestHistory(java.lang.String methodName)
Reports whether a test history exists for a given method. |
java.lang.String[] |
getMethodList()
Gets the list of methods names for which test histories are currently registered with the handler. |
TestHistory |
getTestHistory(java.lang.String methodName)
Gets the test history associated with a given method. |
int |
getTypeFlags()
Gets the bit mask indicating what types of blocks are marked by the test history being managed by the handler. |
java.lang.String |
getTypeString()
Gets a string listing the types of blocks marked by the test history being managed by the handler. |
void |
readTestHistoryFile(java.lang.String fileName)
Reads a test history file making the information available for request from the handler. |
void |
setTestHistory(java.lang.String methodName,
TestHistory th)
Sets the test history associated with a given method. |
void |
setTypeFlags(int typeFlags)
Sets the bit mask indicating what types of blocks are marked by the test histories being managed by the handler. |
protected static java.util.BitSet |
toBinary(java.lang.String hexString)
|
protected static java.lang.String |
toHex(java.util.BitSet bv,
int size)
|
void |
writeTestHistoryFile(java.lang.String fileName)
Writes a test history file from the test history information currently registered with the handler. |
| Methods inherited from class sofya.base.Handler |
|---|
copyFile, createCacheFile, disableParseNumbers, ensureTagExists, formatSignature, isIntAvailable, isStringAvailable, newCache, openCacheFile, openInputFile, openInputFile, openOutputFile, openOutputFile, parseClass, prepareTokenizer, readInt, readIntIgnoreEOL, readJarClasses, readNextLine, readProgFile, readString, readStringIgnoreEOL, readToEOL, readToNextDataLine |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TestHistoryHandler()
Note: You must call
setTypeFlags(int) before
attempting to save a test history file or an IllegalArgumentException
will be thrown.
public TestHistoryHandler(int typeFlags)
typeFlags - Bit mask representing the types of blocks that are
marked in traces managed by the handler. Can be any bitwise combination
of the following (See SConstants):
SConstants.BlockType.MASK_BASICSConstants.BlockType.MASK_ENTRYSConstants.BlockType.MASK_EXITSConstants.BlockType.MASK_CALLjava.lang.IllegalArgumentException - If the bit mask doesn't have a bit set
which corresponds to a valid block type.| Method Detail |
|---|
public void writeTestHistoryFile(java.lang.String fileName)
throws java.io.IOException
fileName - Name of the test history file to be written.
java.io.IOException - If there is an I/O error creating or writing
the file.
public void readTestHistoryFile(java.lang.String fileName)
throws java.io.FileNotFoundException,
LocatableFileException,
BadFileFormatException,
java.io.IOException
getTestHistory(java.lang.String) method
can be used to retrieve information loaded by this method.
fileName - Name of the test history file to be read.
java.io.FileNotFoundException - If the specified file doesn't exist.
BadFileFormatException - If the specified file is not a test
history file, or is otherwise malformed or corrupted.
java.io.IOException - If there is an I/O error reading the file.
LocatableFileExceptionpublic java.lang.String[] getMethodList()
public boolean containsTestHistory(java.lang.String methodName)
methodName - Name of the method which the handler should
check for a test history.
true if a test history is available for the given
method, false otherwise.
public TestHistory getTestHistory(java.lang.String methodName)
throws MethodNotFoundException
methodName - Name of the method for which the test history is to
be retrieved.
TestHistory associated with the
specified method.
MethodNotFoundException - If the handler has no test history
associated with a method of the specified name.
public void setTestHistory(java.lang.String methodName,
TestHistory th)
If a test history already exists for the specified method, it is overwritten. Otherwise the method and test history are added to the set of methods registered with the handler.
methodName - Name of the method for which a test history is
being specified.th - The test history to be associated with the method.public void setTypeFlags(int typeFlags)
typeFlags - Bit mask representing the types of blocks that are
marked in traces managed by the handler. Can be any bitwise combination
of the following (See SConstants):
SConstants.BlockType.MASK_BASICSConstants.BlockType.MASK_ENTRYSConstants.BlockType.MASK_EXITSConstants.BlockType.MASK_CALLjava.lang.IllegalArgumentException - If the bit mask doesn't have a bit set
which corresponds to a valid block type.public int getTypeFlags()
public java.lang.String getTypeString()
protected static java.lang.String toHex(java.util.BitSet bv,
int size)
protected static java.util.BitSet toBinary(java.lang.String hexString)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||