|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jacoco.core.data.ExecutionDataStore
public final class ExecutionDataStore
In-memory data store for execution data. The data can be added through its
IExecutionDataVisitor
interface. If execution data is provided
multiple times for the same class the data is merged, i.e. a probe is marked
as executed if it is reported as executed at least once. This allows to merge
coverage date from multiple runs. An instance of this class is not thread
safe.
Constructor Summary | |
---|---|
ExecutionDataStore()
|
Method Summary | |
---|---|
void |
accept(IExecutionDataVisitor visitor)
Writes the content of the store to the given visitor interface. |
boolean |
contains(String name)
Checks whether execution data for classes with the given name are contained in the store. |
ExecutionData |
get(long id)
Returns the ExecutionData entry with the given id if it exists in
this store. |
ExecutionData |
get(Long id,
String name,
int probecount)
Returns the coverage data for the class with the given identifier. |
Collection<ExecutionData> |
getContents()
Returns a collection that represents current contents of the store. |
void |
put(ExecutionData data)
Adds the given ExecutionData object into the store. |
void |
reset()
Resets all execution data probes, i.e. marks them as not executed. |
void |
subtract(ExecutionData data)
Subtracts the probes in the given ExecutionData object from the
store. |
void |
subtract(ExecutionDataStore store)
Subtracts all probes in the given execution data store from this store. |
void |
visitClassExecution(ExecutionData data)
Provides execution data for a class. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExecutionDataStore()
Method Detail |
---|
public void put(ExecutionData data) throws IllegalStateException
ExecutionData
object into the store. If there is
already execution data with this same class id, this structure is merged
with the given one.
data
- execution data to add or merge
IllegalStateException
- if the given ExecutionData
object is not compatible
to a corresponding one, that is already containedExecutionData.assertCompatibility(long, String, int)
public void subtract(ExecutionData data) throws IllegalStateException
ExecutionData
object from the
store. I.e. for all set probes in the given data object the corresponding
probes in this store will be unset. If there is no execution data with id
of the given data object this operation will have no effect.
data
- execution data to subtract
IllegalStateException
- if the given ExecutionData
object is not compatible
to a corresponding one, that is already containedExecutionData.assertCompatibility(long, String, int)
public void subtract(ExecutionDataStore store)
store
- execution data store to subtractsubtract(ExecutionData)
public ExecutionData get(long id)
ExecutionData
entry with the given id if it exists in
this store.
id
- class id
null
public boolean contains(String name)
name
- VM name
true
if at least one class with the name is
contained.public ExecutionData get(Long id, String name, int probecount)
id
- class identifiername
- VM name of the classprobecount
- probe data length
public void reset()
public Collection<ExecutionData> getContents()
public void accept(IExecutionDataVisitor visitor)
visitor
- interface to write content topublic void visitClassExecution(ExecutionData data)
IExecutionDataVisitor
visitClassExecution
in interface IExecutionDataVisitor
data
- execution data for a class
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |