|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectsofya.ed.structural.processors.AbstractProcessingStrategy
sofya.ed.structural.processors.AbstractJUnitProcessingStrategy
sofya.ed.structural.processors.JUnitBlockCoverageProcessingStrategy
public class JUnitBlockCoverageProcessingStrategy
Processing strategy to receive JUnit basic block coverage probes and dispatch basic block coverage events.
| Field Summary |
|---|
| Fields inherited from class sofya.ed.structural.processors.AbstractJUnitProcessingStrategy |
|---|
err |
| Fields inherited from class sofya.ed.structural.processors.AbstractProcessingStrategy |
|---|
instMode, sbjout, stderr, stdout |
| Constructor Summary | |
|---|---|
JUnitBlockCoverageProcessingStrategy()
Creates a new instance of the processing strategy with a trace handler as the default coverage listener manager. |
|
JUnitBlockCoverageProcessingStrategy(CoverageListenerManager clm)
Creates a new instance of the processing strategy. |
|
| Method Summary | |
|---|---|
boolean |
areCallBlocksActive()
Reports whether call blocks are selected. |
boolean |
areCodeBlocksActive()
Reports whether general basic blocks are selected; general basic blocks are any basic blocks corresponding to actual program code other than method call blocks. |
boolean |
areEntryBlocksActive()
Reports whether entry blocks are selected. |
boolean |
areExitBlocksActive()
Reports whether exit blocks are selected. |
java.util.List |
configure(java.util.List params)
Configures this component from command line parameters. |
void |
endTest(int testNum)
Notifies the processor that a test case has finished executing; this is normally relayed to attached listeners. |
CoverageListenerManager |
getCoverageListenerManager()
Gets the coverage listener manager to be used. |
SConstants.TraceObjectType |
getObjectType()
Gets the type of structural object for which this processor can receive probes. |
int |
getTypeFlags()
Gets the bitmask corresponding to the types of basic blocks currently selected. |
boolean |
isReady()
Reports whether this component is ready for the event dispatcher to begin dispatching events. |
void |
newTest(int testNum)
Notifies the processor that a new test case is about to execute; this is normally relayed to attached listeners. |
void |
processData(java.lang.Object instArray,
java.lang.String mSig,
int fromIndex,
int toIndex)
Instrumentation data received from the subject. |
void |
register(EventDispatcherConfiguration edConfig)
Registers this component with the event dispatcher. |
void |
release()
Notifies this component that its current lifecycle has expired and that it should commit any stored state and release resources. |
void |
setCallBlocksActive(boolean enable)
Sets whether call blocks are selected. |
void |
setCodeBlocksActive(boolean enable)
Sets whether general basic blocks are selected; general basic blocks are any basic blocks corresponding to actual program code other than method call blocks. |
void |
setCoverageListenerManager(CoverageListenerManager clm)
Sets the coverage listener manager to be used. |
void |
setEntryBlocksActive(boolean enable)
Sets whether entry blocks are selected. |
void |
setExitBlocksActive(boolean enable)
Sets whether exit blocks are selected. |
void |
setMethodObjectCount(java.lang.String mSig,
int objCount)
Notification received from the instrumentated subject indicating a structural object count for a method. |
void |
setup()
Notifies the processor to perform any setup required to receive probes from the subject. |
| Methods inherited from class sofya.ed.structural.processors.AbstractJUnitProcessingStrategy |
|---|
checkError, reset, setInstrumentationMode |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JUnitBlockCoverageProcessingStrategy()
public JUnitBlockCoverageProcessingStrategy(CoverageListenerManager clm)
clm - Coverage listener manager to be used to retrieve coverage
listeners to which events will be dispatched.| Method Detail |
|---|
public CoverageListenerManager getCoverageListenerManager()
public void setCoverageListenerManager(CoverageListenerManager clm)
clm - Coverage listener manager to be used to retrieve coverage
listeners to which events will be dispatched.public void register(EventDispatcherConfiguration edConfig)
AbstractProcessingStrategyRegisters this component with the event dispatcher.
register in interface ActiveComponentregister in class AbstractProcessingStrategyedConfig - The current configuration of system global resources
and settings that the component will use as appropriate.public java.util.List configure(java.util.List params)
ActiveComponentConfigures this component from command line parameters.
This method provides a component the opportunity to define and process command line parameters required to configure itself. Components participate in a processing chain, initiated in Sofya-provided event dispatchers by calling this method on the processing strategy. The processing strategies provided by Sofya in turn invoke this method on any listeners implementing this interface.
configure in interface ActiveComponentconfigure in class AbstractJUnitProcessingStrategyparams - A list of command line tokens that have not yet
been processed by any previous components.
public boolean isReady()
ActiveComponentReports whether this component is ready for the event dispatcher to begin dispatching events.
Calls to this method are chained similarly to the ActiveComponent.configure(java.util.List)
method. The event dispatcher will fail with an error if a client
invokes ProgramEventDispatcher.startDispatcher() when any
attached component returns false from this method.
isReady in interface ActiveComponentisReady in class AbstractJUnitProcessingStrategytrue if this component is ready for the event
dispatcher to begin dispatching events, false otherwise.public void release()
ActiveComponentNotifies this component that its current lifecycle has expired and that it should commit any stored state and release resources.
Calls to this method are chained similary to the ActiveComponent.configure(java.util.List)
method. This method is invoked directly by a client of the event
dispatcher. Normally, it should be used to release any resources that
were required to persist over multiple runs of the event dispatcher.
release in interface ActiveComponentrelease in class AbstractJUnitProcessingStrategypublic SConstants.TraceObjectType getObjectType()
JUnitProcessingStrategyThis is used by the JUnit event dispatcher for certain configuration activities.
getObjectType in interface JUnitProcessingStrategypublic void setup()
JUnitProcessingStrategy
setup in interface JUnitProcessingStrategypublic void newTest(int testNum)
JUnitProcessingStrategy
newTest in interface JUnitProcessingStrategytestNum - The number of the test case about to execute.public void endTest(int testNum)
JUnitProcessingStrategy
endTest in interface JUnitProcessingStrategytestNum - The number of the test case that finished executing.
public void setMethodObjectCount(java.lang.String mSig,
int objCount)
JUnitProcessingStrategy
setMethodObjectCount in interface JUnitProcessingStrategymSig - Concatenation of the fully qualified class name, method
name, and JNI signature of the method for which an object count is
being reported.objCount - The number of structural objects in the method.
public void processData(java.lang.Object instArray,
java.lang.String mSig,
int fromIndex,
int toIndex)
JUnitProcessingStrategyThis is a mapping of the actual instrumentation method called from the subject. The data provided varies depending on the the type of instrumentation applied.
processData in interface JUnitProcessingStrategyinstArray - Array of instrumentation data. The type and contents
depend on the type of instrumentation applied.mSig - Concatenation of the fully qualified class name, method
name, and JNI signature of the method for which an object count is
being reported.fromIndex - Start index of the segment of the array to be processed
on this invocation.toIndex - End index of the segment of the array to be processed on
this invocation.public boolean areCodeBlocksActive()
BlockInstrumentationStrategy
areCodeBlocksActive in interface BlockInstrumentationStrategytrue if general basic blocks are selected,
false otherwise.public void setCodeBlocksActive(boolean enable)
BlockInstrumentationStrategy
setCodeBlocksActive in interface BlockInstrumentationStrategyenable - true to select general basic blocks,
false to ignore.public boolean areEntryBlocksActive()
BlockInstrumentationStrategy
areEntryBlocksActive in interface BlockInstrumentationStrategytrue if entry blocks are selected,
false otherwise.public void setEntryBlocksActive(boolean enable)
BlockInstrumentationStrategy
setEntryBlocksActive in interface BlockInstrumentationStrategyenable - true to select entry blocks,
false to ignore.public boolean areExitBlocksActive()
BlockInstrumentationStrategy
areExitBlocksActive in interface BlockInstrumentationStrategytrue if exit blocks are selected,
false otherwise.public void setExitBlocksActive(boolean enable)
BlockInstrumentationStrategy
setExitBlocksActive in interface BlockInstrumentationStrategyenable - true to select exit blocks,
false to ignore.public boolean areCallBlocksActive()
BlockInstrumentationStrategy
areCallBlocksActive in interface BlockInstrumentationStrategytrue if call blocks are selected,
false otherwise.public void setCallBlocksActive(boolean enable)
BlockInstrumentationStrategy
setCallBlocksActive in interface BlockInstrumentationStrategyenable - true to select call blocks,
false to ignore.public int getTypeFlags()
BlockInstrumentationStrategyUsed for communicating configuration information to certain other components. To be phased out at a future date.
getTypeFlags in interface BlockInstrumentationStrategy
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||