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

COVERAGE SUMMARY FOR SOURCE FILE [CopyDesignDecisionGenotype.java]

nameclass, %method, %block, %line, %
CopyDesignDecisionGenotype.java0%   (0/1)0%   (0/2)0%   (0/28)0%   (0/6)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class CopyDesignDecisionGenotype0%   (0/1)0%   (0/2)0%   (0/28)0%   (0/6)
CopyDesignDecisionGenotype (): void 0%   (0/1)0%   (0/3)0%   (0/1)
copy (DesignDecisionGenotype): DesignDecisionGenotype 0%   (0/1)0%   (0/25)0%   (0/5)

1package de.uka.ipd.sdq.dsexplore.opt4j.operator;
2 
3import org.eclipse.emf.ecore.util.EcoreUtil;
4import org.opt4j.operator.copy.Copy;
5 
6import de.uka.ipd.sdq.dsexplore.opt4j.genotype.DesignDecisionGenotype;
7import de.uka.ipd.sdq.pcm.designdecision.Choice;
8 
9public class CopyDesignDecisionGenotype implements Copy<DesignDecisionGenotype> {
10 
11        @Override
12        public DesignDecisionGenotype copy(DesignDecisionGenotype genotype) {
13                DesignDecisionGenotype copy = genotype.newInstance();
14                
15                for (Choice choice : genotype) {
16                        //only copies the object and contained other model elements 
17                        //(i.e. the full tree that is made out of containment references).
18                        //As the PCm model elements are never in a containment relation here, 
19                        //the PCM will not be tampered with here.  
20                        Choice copiedChoice = (Choice)EcoreUtil.copy(choice);
21                        copy.add(copiedChoice);
22                }
23                return copy;
24        }
25 
26}

[all classes][de.uka.ipd.sdq.dsexplore.opt4j.operator]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov