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

COVERAGE SUMMARY FOR SOURCE FILE [VariableUsageInputParameterContentProvider.java]

nameclass, %method, %block, %line, %
VariableUsageInputParameterContentProvider.java0%   (0/1)0%   (0/2)0%   (0/103)0%   (0/23)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class VariableUsageInputParameterContentProvider0%   (0/1)0%   (0/2)0%   (0/103)0%   (0/23)
VariableUsageInputParameterContentProvider (): void 0%   (0/1)0%   (0/3)0%   (0/1)
getChildren (Object): Object [] 0%   (0/1)0%   (0/100)0%   (0/22)

1package de.uka.ipd.sdq.pcm.dialogs.variableusage;
2 
3import java.util.ArrayList;
4 
5import de.uka.ipd.sdq.pcm.repository.EventType;
6import de.uka.ipd.sdq.pcm.repository.InfrastructureSignature;
7import de.uka.ipd.sdq.pcm.repository.OperationSignature;
8import de.uka.ipd.sdq.pcm.repository.Parameter;
9import de.uka.ipd.sdq.pcm.repository.ParameterModifier;
10import de.uka.ipd.sdq.pcm.seff.seff_performance.InfrastructureCall;
11 
12/**
13 * This content provider collects the parameters of a parent object
14 * to be used in a variable usage.
15 * 
16 * @author Benjamin Klatt
17 * @author groenda
18 */
19public class VariableUsageInputParameterContentProvider extends
20                VariableUsageContentProvider {
21 
22        @Override
23        public Object[] getChildren(Object parent) {
24                if (parent instanceof OperationSignature) {
25                        /*
26                         * Operation Signature Parameter
27                         */
28                        OperationSignature signature = (OperationSignature) parent;
29                        ArrayList<Parameter> inputParameter = new ArrayList<Parameter>();
30                        for (Parameter p : signature.getParameters__OperationSignature()) {
31                                if (p.getModifier__Parameter() == ParameterModifier.NONE || 
32                                        p.getModifier__Parameter() == ParameterModifier.IN || 
33                                        p.getModifier__Parameter() == ParameterModifier.INOUT){
34                                        inputParameter.add(p);
35                                }
36                        }
37                        return inputParameter.toArray();
38                } else        if (parent instanceof EventType) {
39                        /*
40                         * Event Type Parameter
41                         */
42                        EventType eventType = (EventType) parent;
43                        return new Object[]{eventType.getParameter__EventType()};
44                } else if (parent instanceof InfrastructureSignature) {
45                        /* 
46                         * Infrastructure Signature Parameters 
47                         */
48                        InfrastructureSignature signature = (InfrastructureSignature) parent;
49                        ArrayList<Parameter> inputParameter = new ArrayList<Parameter>();
50                        for (Parameter p : signature.getParameters__InfrastructureSignature()) {
51                                if (p.getModifier__Parameter() == ParameterModifier.NONE || 
52                                        p.getModifier__Parameter() == ParameterModifier.IN || 
53                                        p.getModifier__Parameter() == ParameterModifier.INOUT){
54                                        inputParameter.add(p);
55                                }
56                        }
57                        return inputParameter.toArray();
58                } else {
59                        return super.getChildren(parent);
60                }
61        }
62 
63}

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