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

COVERAGE SUMMARY FOR SOURCE FILE [FeatureUtils.java]

nameclass, %method, %block, %line, %
FeatureUtils.java0%   (0/1)0%   (0/2)0%   (0/33)0%   (0/8)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class FeatureUtils0%   (0/1)0%   (0/2)0%   (0/33)0%   (0/8)
FeatureUtils (): void 0%   (0/1)0%   (0/3)0%   (0/1)
hasFeature (FeatureConfig, String): boolean 0%   (0/1)0%   (0/30)0%   (0/7)

1package de.uka.ipd.sdq.pcm.transformations;
2 
3import java.util.Iterator;
4 
5import org.eclipse.emf.common.util.EList;
6 
7import de.uka.ipd.sdq.featureconfig.ConfigNode;
8import de.uka.ipd.sdq.featureconfig.ConfigState;
9import de.uka.ipd.sdq.featureconfig.FeatureConfig;
10import de.uka.ipd.sdq.featuremodel.Feature;
11 
12public class FeatureUtils {
13 
14        public static boolean hasFeature(FeatureConfig featureConfig, String featureName) {
15                EList<ConfigNode> nodes = featureConfig.getConfignode();
16                Iterator<ConfigNode> it = nodes.iterator();
17                while (it.hasNext()){
18                        ConfigNode configNode = it.next();
19                        if ( ((Feature)configNode.getOrigin()).getName().equals(featureName)) {
20                                return configNode.getConfigState() == ConfigState.SELECTED;
21                        }
22                }
23                return false;
24                // throw new RuntimeException("Feature Configuration not found: "+featureName);
25        }
26 
27}

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