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

COVERAGE SUMMARY FOR SOURCE FILE [AbstractBranchTransitionHandler.java]

nameclass, %method, %block, %line, %
AbstractBranchTransitionHandler.java0%   (0/1)0%   (0/4)0%   (0/44)0%   (0/16)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class AbstractBranchTransitionHandler0%   (0/1)0%   (0/4)0%   (0/44)0%   (0/16)
<static initializer> 0%   (0/1)0%   (0/5)0%   (0/2)
AbstractBranchTransitionHandler (SeffVisitor): void 0%   (0/1)0%   (0/9)0%   (0/4)
storeToUsageContext (AbstractBranchTransition, double): void 0%   (0/1)0%   (0/19)0%   (0/5)
visitChildBehaviour (AbstractBranchTransition): void 0%   (0/1)0%   (0/11)0%   (0/5)

1package de.uka.ipd.sdq.pcmsolver.handler;
2 
3import org.apache.log4j.Logger;
4 
5import de.uka.ipd.sdq.context.computed_usage.BranchProbability;
6import de.uka.ipd.sdq.context.computed_usage.ComputedUsageFactory;
7import de.uka.ipd.sdq.pcm.seff.AbstractBranchTransition;
8import de.uka.ipd.sdq.pcm.seff.ResourceDemandingBehaviour;
9import de.uka.ipd.sdq.pcmsolver.visitors.SeffVisitor;
10 
11public abstract class AbstractBranchTransitionHandler {
12 
13        private static Logger logger = Logger.getLogger(AbstractBranchTransitionHandler.class.getName());
14 
15        protected ComputedUsageFactory usageFactory = ComputedUsageFactory.eINSTANCE;
16 
17        
18        protected SeffVisitor visitor;
19 
20        /**
21         * @param context
22         * @param _visitor
23         * @param nextHandler
24         */
25        public AbstractBranchTransitionHandler(SeffVisitor seffVisitor) {
26                visitor = seffVisitor;
27        }
28        
29        /**
30         * @param bt
31         */
32        protected void visitChildBehaviour(AbstractBranchTransition bt) {
33                ResourceDemandingBehaviour rdb = bt
34                                .getBranchBehaviour_BranchTransition();
35                if (rdb != null){
36                        visitor.doSwitch(rdb);
37                }
38        }
39 
40        /**
41         * @param bt
42         * @param solvedBranchProb
43         */
44        protected void storeToUsageContext(AbstractBranchTransition bt, double solvedBranchProb) {
45                BranchProbability prob = usageFactory.createBranchProbability();
46                prob.setBranchtransition_BranchProbability(bt);
47                prob.setProbability(solvedBranchProb);
48 
49                visitor.getContextWrapper().getCompUsgCtx().getBranchProbabilities_ComputedUsageContext().add(prob);
50        }
51}

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