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

COVERAGE SUMMARY FOR SOURCE FILE [MiddlewareComponentSeffBuilder.java]

nameclass, %method, %block, %line, %
MiddlewareComponentSeffBuilder.java0%   (0/1)0%   (0/6)0%   (0/95)0%   (0/33)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class MiddlewareComponentSeffBuilder0%   (0/1)0%   (0/6)0%   (0/95)0%   (0/33)
MiddlewareComponentSeffBuilder (OperationProvidedRole, OperationRequiredRole,... 0%   (0/1)0%   (0/8)0%   (0/3)
appendPostMiddlewareCall (OperationSignature): void 0%   (0/1)0%   (0/13)0%   (0/7)
appendPreMiddlewareCall (OperationSignature): void 0%   (0/1)0%   (0/13)0%   (0/7)
createMiddlewareParameter (): Collection 0%   (0/1)0%   (0/14)0%   (0/3)
createOutParameter (): Collection 0%   (0/1)0%   (0/14)0%   (0/3)
createVariableUsage (String, VariableCharacterisationType, String): VariableU... 0%   (0/1)0%   (0/33)0%   (0/10)

1package de.uka.ipd.sdq.pcm.transformations.builder.seff;
2 
3import java.util.ArrayList;
4import java.util.Collection;
5 
6import de.uka.ipd.sdq.pcm.core.CoreFactory;
7import de.uka.ipd.sdq.pcm.parameter.ParameterFactory;
8import de.uka.ipd.sdq.pcm.parameter.VariableCharacterisation;
9import de.uka.ipd.sdq.pcm.parameter.VariableCharacterisationType;
10import de.uka.ipd.sdq.pcm.parameter.VariableUsage;
11import de.uka.ipd.sdq.pcm.repository.OperationProvidedRole;
12import de.uka.ipd.sdq.pcm.repository.OperationRequiredRole;
13import de.uka.ipd.sdq.pcm.repository.OperationSignature;
14import de.uka.ipd.sdq.stoex.StoexFactory;
15import de.uka.ipd.sdq.stoex.VariableReference;
16 
17public class MiddlewareComponentSeffBuilder extends DelegatorComponentSeffBuilder {
18 
19        protected OperationRequiredRole middlewareRole;
20 
21        public MiddlewareComponentSeffBuilder(
22                        OperationProvidedRole domainProvRole,
23                        OperationRequiredRole domainReqRole,
24                        OperationRequiredRole middlewareReqRole) {
25                super(domainProvRole, domainReqRole);
26                this.middlewareRole = middlewareReqRole;
27        }
28 
29        public void appendPreMiddlewareCall(OperationSignature preSignature) {
30                this.appendPreAction(
31                                new ExternalCallActionDescriptor(
32                                                preSignature,
33                                                this.middlewareRole,
34                                                createMiddlewareParameter(),
35                                                createOutParameter()));
36        }
37 
38        public void appendPostMiddlewareCall(OperationSignature postSignature) {
39                this.appendPostAction(
40                                new ExternalCallActionDescriptor(
41                                                postSignature,
42                                                this.middlewareRole,
43                                                createMiddlewareParameter(),
44                                                createOutParameter()));
45        }
46 
47        protected Collection<VariableUsage> createMiddlewareParameter() {
48                Collection<VariableUsage> result = new ArrayList<VariableUsage>();
49                result.add(createVariableUsage("stream", VariableCharacterisationType.BYTESIZE, "stream.BYTESIZE"));
50                return result; 
51        }
52        
53        protected VariableUsage createVariableUsage(String variableName, VariableCharacterisationType type, String spec) {
54                VariableUsage usage = ParameterFactory.eINSTANCE.createVariableUsage();
55                VariableCharacterisation characterisation = ParameterFactory.eINSTANCE.createVariableCharacterisation();
56                VariableReference name = StoexFactory.eINSTANCE.createVariableReference();
57                name.setReferenceName(variableName);
58                characterisation.setSpecification_VariableCharacterisation(CoreFactory.eINSTANCE.createPCMRandomVariable());
59                characterisation.getSpecification_VariableCharacterisation().setSpecification(spec);
60                characterisation.setType(type);
61                usage.setNamedReference__VariableUsage(name);
62                usage.getVariableCharacterisation_VariableUsage().add(characterisation);
63                
64                return usage;
65        }
66        
67        private Collection<VariableUsage> createOutParameter() {
68                Collection<VariableUsage> result = new ArrayList<VariableUsage>();
69                result.add(createVariableUsage("stream", VariableCharacterisationType.BYTESIZE, "RETURN.BYTESIZE"));
70                return result; 
71        }        
72}

[all classes][de.uka.ipd.sdq.pcm.transformations.builder.seff]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov