public interface MeasurementResultAnalyser
Blackboard by analysing measurement results.
This analyser can only use measurement results to propose new
EvaluableExpressions. Analysers that use
EvaluableExpressions for their analysis, too, should
implement ProposedExpressionAnalyser instead of this interface. For more
details, look for the Blackboard layers in the Design and Architecture document in
chapter 2. Tools wishing to conduct measurements on software are advised to implement
MeasurementTool instead of this
interface.
Measurement result analysers need a public zero argument constructor for the instantiation, because they are loaded through eclipse extension points.
| Modifier and Type | Method and Description |
|---|---|
boolean |
canContribute(ReadOnlyMeasurementResultAnalyserBlackboardView blackboard)
Determines whether this analyser can potentially contribute knowledge in the
moment.
|
void |
contribute(MeasurementResultAnalyserBlackboardView blackboard)
Contributes this analyser’s knowledge to the passed blackboard.
|
boolean canContribute(ReadOnlyMeasurementResultAnalyserBlackboardView blackboard)
true is returned, the analyser can potentially contribute, but
might still be unable to generate meaningful results when being executed. If
false is returned, calling contribute(de.uka.ipd.sdq.beagle.core.analysis.MeasurementResultAnalyserBlackboardView) will not yield any new
results. Calling this method has no implications on whether or when
contribute(de.uka.ipd.sdq.beagle.core.analysis.MeasurementResultAnalyserBlackboardView) will be called. Passing a blackboard that was last
modified by this analyser’s contribute(de.uka.ipd.sdq.beagle.core.analysis.MeasurementResultAnalyserBlackboardView) must always result in false
.
This method must behave entirely stateless, meaning that its result do not
depend on any prior calls to any method but only on the passed blackboard.
Furthermore, calls with equal blackboard contents must always result in the same
value.
blackboard - The current blackboard.true only if contribute(de.uka.ipd.sdq.beagle.core.analysis.MeasurementResultAnalyserBlackboardView) may be called.void contribute(MeasurementResultAnalyserBlackboardView blackboard)
Calling this method with a blackboard for which canContribute(de.uka.ipd.sdq.beagle.core.analysis.ReadOnlyMeasurementResultAnalyserBlackboardView) returns
false results in undefined behaviour. This method must
canContribute(de.uka.ipd.sdq.beagle.core.analysis.ReadOnlyMeasurementResultAnalyserBlackboardView)) but only on the passed
blackboard.
blackboard.
canContribute(de.uka.ipd.sdq.beagle.core.analysis.ReadOnlyMeasurementResultAnalyserBlackboardView) is called with the blackboard like its
left by this method, it will return false.
Implementing BlackboardStorer and using
Blackboard.writeFor(Class, java.io.Serializable)
is, if needed, the recommended way to achieve the behaviour described above.
blackboard - The current blackboard.