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

COVERAGE SUMMARY FOR SOURCE FILE [Helper.java]

nameclass, %method, %block, %line, %
Helper.java0%   (0/1)0%   (0/5)0%   (0/39)0%   (0/8)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class Helper0%   (0/1)0%   (0/5)0%   (0/39)0%   (0/8)
Helper (): void 0%   (0/1)0%   (0/3)0%   (0/1)
getRdseff (AbstractAction): ResourceDemandingSEFF 0%   (0/1)0%   (0/15)0%   (0/4)
getResourceFileName (CharacterisedPCMParameterPartition): String 0%   (0/1)0%   (0/5)0%   (0/1)
getResourceFileName (ResourceDemandingSEFF): String 0%   (0/1)0%   (0/5)0%   (0/1)
removeAllSpecialChars (String): String 0%   (0/1)0%   (0/11)0%   (0/1)

1package de.uka.sdq.pcm.transformations;
2 
3import org.eclipse.emf.ecore.EObject;
4 
5import de.fzi.se.quality.qualityannotation.CharacterisedPCMParameterPartition;
6import de.uka.ipd.sdq.pcm.seff.AbstractAction;
7import de.uka.ipd.sdq.pcm.seff.ResourceDemandingSEFF;
8 
9public class Helper {
10        public static String removeAllSpecialChars(String s) {
11                return s.replace('\n',' ').replace('\t', ' ').replace('\r', ' ');
12        }
13 
14        /**
15         * @param eObject The object.
16         * @return The file name of the resource containing the object.
17         */
18        public static String getResourceFileName(ResourceDemandingSEFF eObject) {
19                return eObject.eResource().getURI().toFileString();
20        }
21 
22        /**
23         * @param eObject The object.
24         * @return The file name of the resource containing the object.
25         */
26        public static String getResourceFileName(CharacterisedPCMParameterPartition eObject) {
27                return eObject.eResource().getURI().toFileString();
28        }
29 
30        /**
31         * @param action The action.
32         * @return The {@link ResourceDemandingSEFF} containing the action or {@code null} if none could be found.
33         */
34        public static ResourceDemandingSEFF getRdseff(AbstractAction action) {
35                EObject src = action;
36                while (src.eContainer() != null && !(src instanceof ResourceDemandingSEFF)) {
37                        src = src.eContainer();
38                }
39                return (ResourceDemandingSEFF) src;
40        }
41}

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