EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.probespec.framework]

COVERAGE SUMMARY FOR SOURCE FILE [BlackboardFactory.java]

nameclass, %method, %block, %line, %
BlackboardFactory.java0%   (0/1)0%   (0/3)0%   (0/69)0%   (0/7)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class BlackboardFactory0%   (0/1)0%   (0/3)0%   (0/69)0%   (0/7)
$SWITCH_TABLE$de$uka$ipd$sdq$probespec$framework$BlackboardType (): int [] 0%   (0/1)0%   (0/34)0%   (0/1)
BlackboardFactory (): void 0%   (0/1)0%   (0/3)0%   (0/1)
createBlackboard (BlackboardType, ThreadManager): ISampleBlackboard 0%   (0/1)0%   (0/32)0%   (0/6)

1package de.uka.ipd.sdq.probespec.framework;
2 
3import de.uka.ipd.sdq.probespec.framework.concurrency.ConcurrentSampleBlackboard;
4import de.uka.ipd.sdq.probespec.framework.concurrency.ThreadManager;
5 
6/**
7 * This factory creates instances of {@link ISampleBlackboard} for the various
8 * {@link BlackboardType}s.
9 * 
10 * @author Philipp Merkle
11 * 
12 */
13public class BlackboardFactory {
14 
15    /**
16     * Creates a blackboard of the specified type. If a {@link BlackboardType#CONCURRENT} blackboard
17     * is to be created, a <code>threadManager</code> is expected; otherwise, this parameter may
18     * be <code>null</code>.
19     * 
20     * @param type
21     *            the type of the blackboard to create
22     * @param threadManager
23     *            the {@link ThreadManager}, if creating a {@link BlackboardType#CONCURRENT}
24     *            blackboard; <code>null</code> else
25     * @return the created blackboard
26     */
27    public static ISampleBlackboard createBlackboard(BlackboardType type, ThreadManager threadManager) {
28        switch (type) {
29        case SIMPLE:
30            return new SampleBlackboard();
31        case CONCURRENT:
32            return new ConcurrentSampleBlackboard(threadManager);
33        case NONE:
34            return new NullSampleBlackboard();
35        }
36 
37        throw new RuntimeException("Could not create a blackboard of type " + type.toString()
38                + ", as it is unknown how to handle this type.");
39    }
40 
41}

[all classes][de.uka.ipd.sdq.probespec.framework]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov