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 [AggregatedContextExternalCallActionHandler.java]

nameclass, %method, %block, %line, %
AggregatedContextExternalCallActionHandler.java0%   (0/1)0%   (0/5)0%   (0/47)0%   (0/13)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class AggregatedContextExternalCallActionHandler0%   (0/1)0%   (0/5)0%   (0/47)0%   (0/13)
AggregatedContextExternalCallActionHandler (AggregatedContextSEFFVisitor, Usa... 0%   (0/1)0%   (0/11)0%   (0/4)
getCalledAllocationContext (): AllocationContext 0%   (0/1)0%   (0/3)0%   (0/1)
getCalledAssemblyCtxt (): AssemblyContext 0%   (0/1)0%   (0/3)0%   (0/1)
getCalledSEFF (): ServiceEffectSpecification 0%   (0/1)0%   (0/3)0%   (0/1)
visitSEFF (ServiceEffectSpecification, ContextWrapper): SeffVisitor 0%   (0/1)0%   (0/27)0%   (0/6)

1package de.uka.ipd.sdq.pcmsolver.handler;
2 
3import de.uka.ipd.sdq.pcm.allocation.AllocationContext;
4import de.uka.ipd.sdq.pcm.core.composition.AssemblyContext;
5import de.uka.ipd.sdq.pcm.seff.ServiceEffectSpecification;
6import de.uka.ipd.sdq.pcm.usagemodel.UsageScenario;
7import de.uka.ipd.sdq.pcmsolver.transformations.ContextWrapper;
8import de.uka.ipd.sdq.pcmsolver.visitors.AggregatedContextSEFFVisitor;
9import de.uka.ipd.sdq.pcmsolver.visitors.SeffVisitor;
10 
11/**
12 * Extends the {@link ExternalCallActionHandler} by overwriting {@link ExternalCallActionHandler#visitSEFF(ServiceEffectSpecification, ContextWrapper)}.
13 * Creates a new {@link AggregatedContextSEFFVisitor} instead of a normal {@link SeffVisitor}.
14 * @author martens
15 *
16 */
17public class AggregatedContextExternalCallActionHandler extends
18                ExternalCallActionHandler {
19 
20        private double frequency;
21        private UsageScenario usageScenario;
22        private ServiceEffectSpecification calledSEFF;
23        private AssemblyContext calledAssemblyCtxt;
24        private AllocationContext calledAllocationContext;
25 
26        public AggregatedContextExternalCallActionHandler(AggregatedContextSEFFVisitor seffVisitor, UsageScenario usageScenario) {
27                super(seffVisitor);
28                this.frequency = seffVisitor.getCurrentFrequency();
29                this.usageScenario = usageScenario;
30        }
31 
32        /**
33         * Creates a new {@link AggregatedContextSEFFVisitor} instead of a normal {@link SeffVisitor}, which adds the calculation 
34         * of execution frequencies to the context model. 
35         */
36        @Override
37        SeffVisitor visitSEFF(ServiceEffectSpecification seff,
38                        ContextWrapper contextWrapper) {
39                AggregatedContextSEFFVisitor seffVisitor = new AggregatedContextSEFFVisitor(contextWrapper, this.frequency, seff, this.usageScenario);
40                
41                this.calledSEFF = seff;
42                this.calledAssemblyCtxt = contextWrapper.getAssCtx();
43                this.calledAllocationContext = contextWrapper.getAllCtx();
44                
45                seffVisitor.doSwitch(seff);
46                return seffVisitor;
47        }
48        
49        
50        public ServiceEffectSpecification getCalledSEFF() {
51                return calledSEFF;
52        }
53 
54        public AssemblyContext getCalledAssemblyCtxt() {
55                return calledAssemblyCtxt;
56        }        
57 
58        public AllocationContext getCalledAllocationContext() {
59                return calledAllocationContext;
60        }
61}

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