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

nameclass, %method, %block, %line, %
VariableUsageOutputParameterContentProvider.java0%   (0/1)0%   (0/2)0%   (0/69)0%   (0/17)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class VariableUsageOutputParameterContentProvider0%   (0/1)0%   (0/2)0%   (0/69)0%   (0/17)
VariableUsageOutputParameterContentProvider (): void 0%   (0/1)0%   (0/3)0%   (0/1)
getChildren (Object): Object [] 0%   (0/1)0%   (0/66)0%   (0/16)

1package de.uka.ipd.sdq.pcm.dialogs.variableusage;
2 
3import java.util.ArrayList;
4 
5import de.uka.ipd.sdq.pcm.repository.InfrastructureSignature;
6import de.uka.ipd.sdq.pcm.repository.OperationSignature;
7import de.uka.ipd.sdq.pcm.repository.Parameter;
8import de.uka.ipd.sdq.pcm.repository.ParameterModifier;
9import de.uka.ipd.sdq.pcm.repository.RepositoryFactory;
10 
11public class VariableUsageOutputParameterContentProvider extends
12                VariableUsageContentProvider {
13 
14        @Override
15        public Object[] getChildren(Object parent) {
16                if (parent instanceof OperationSignature) {
17                        /*
18                         * Business Operation Signature
19                         */
20                        OperationSignature signature = (OperationSignature) parent;
21                        ArrayList<Parameter> outputParameter = new ArrayList<Parameter>();
22                        for (Parameter p : signature.getParameters__OperationSignature()) {
23                                if (p.getModifier__Parameter() == ParameterModifier.OUT || 
24                                        p.getModifier__Parameter() == ParameterModifier.INOUT){
25                                        outputParameter.add(p);
26                                }
27                        }
28                        if (signature.getReturnType__OperationSignature() != null){
29                                Parameter ret = RepositoryFactory.eINSTANCE.createParameter();
30                                ret.setDataType__Parameter(signature.getReturnType__OperationSignature());
31                                ret.setParameterName("RETURN");
32                                outputParameter.add(ret);
33                        }
34                        return outputParameter.toArray();
35                } else if (parent instanceof InfrastructureSignature) {
36                        // There are no output parameters for infrastructure signature.
37                        return new ArrayList<Parameter>().toArray();
38                } else {
39                        return super.getChildren(parent);
40                }
41        }
42 
43}

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