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

COVERAGE SUMMARY FOR SOURCE FILE [ResourceenvironmentFactoryImpl.java]

nameclass, %method, %block, %line, %
ResourceenvironmentFactoryImpl.java0%   (0/1)0%   (0/16)0%   (0/206)0%   (0/43)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ResourceenvironmentFactoryImpl0%   (0/1)0%   (0/16)0%   (0/206)0%   (0/43)
ResourceenvironmentFactoryImpl (): void 0%   (0/1)0%   (0/3)0%   (0/2)
convertContainerOperatingSystemToString (EDataType, Object): String 0%   (0/1)0%   (0/7)0%   (0/1)
convertSchedulingPolicyToString (EDataType, Object): String 0%   (0/1)0%   (0/7)0%   (0/1)
convertToString (EDataType, Object): String 0%   (0/1)0%   (0/27)0%   (0/4)
create (EClass): EObject 0%   (0/1)0%   (0/32)0%   (0/7)
createCommunicationLinkResourceSpecification (): CommunicationLinkResourceSpe... 0%   (0/1)0%   (0/6)0%   (0/2)
createContainerOperatingSystemFromString (EDataType, String): ContainerOperat... 0%   (0/1)0%   (0/25)0%   (0/3)
createFromString (EDataType, String): Object 0%   (0/1)0%   (0/27)0%   (0/4)
createLinkingResource (): LinkingResource 0%   (0/1)0%   (0/6)0%   (0/2)
createProcessingResourceSpecification (): ProcessingResourceSpecification 0%   (0/1)0%   (0/6)0%   (0/2)
createResourceContainer (): ResourceContainer 0%   (0/1)0%   (0/6)0%   (0/2)
createResourceEnvironment (): ResourceEnvironment 0%   (0/1)0%   (0/6)0%   (0/2)
createSchedulingPolicyFromString (EDataType, String): SchedulingPolicy 0%   (0/1)0%   (0/25)0%   (0/3)
getPackage (): ResourceenvironmentPackage 0%   (0/1)0%   (0/2)0%   (0/1)
getResourceenvironmentPackage (): ResourceenvironmentPackage 0%   (0/1)0%   (0/4)0%   (0/1)
init (): ResourceenvironmentFactory 0%   (0/1)0%   (0/17)0%   (0/6)

1/**
2 * Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany
3 *
4 * $Id$
5 */
6package de.uka.ipd.sdq.pcm.resourceenvironment.impl;
7 
8import de.uka.ipd.sdq.pcm.resourceenvironment.*;
9import org.eclipse.emf.ecore.EClass;
10import org.eclipse.emf.ecore.EDataType;
11import org.eclipse.emf.ecore.EObject;
12import org.eclipse.emf.ecore.EPackage;
13import org.eclipse.emf.ecore.impl.EFactoryImpl;
14import org.eclipse.emf.ecore.plugin.EcorePlugin;
15 
16import de.uka.ipd.sdq.pcm.resourceenvironment.CommunicationLinkResourceSpecification;
17import de.uka.ipd.sdq.pcm.resourceenvironment.ContainerOperatingSystem;
18import de.uka.ipd.sdq.pcm.resourceenvironment.LinkingResource;
19import de.uka.ipd.sdq.pcm.resourceenvironment.ProcessingResourceSpecification;
20import de.uka.ipd.sdq.pcm.resourceenvironment.ResourceContainer;
21import de.uka.ipd.sdq.pcm.resourceenvironment.ResourceEnvironment;
22import de.uka.ipd.sdq.pcm.resourceenvironment.ResourceenvironmentFactory;
23import de.uka.ipd.sdq.pcm.resourceenvironment.ResourceenvironmentPackage;
24import de.uka.ipd.sdq.pcm.resourceenvironment.SchedulingPolicy;
25 
26/**
27 * <!-- begin-user-doc -->
28 * An implementation of the model <b>Factory</b>.
29 * <!-- end-user-doc -->
30 * @generated
31 */
32public class ResourceenvironmentFactoryImpl extends EFactoryImpl implements ResourceenvironmentFactory {
33        /**
34         * <!-- begin-user-doc -->
35         * <!-- end-user-doc -->
36         * @generated
37         */
38        public static final String copyright = "Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany";
39 
40        /**
41         * Creates the default factory implementation.
42         * <!-- begin-user-doc -->
43         * <!-- end-user-doc -->
44         * @generated
45         */
46        public static ResourceenvironmentFactory init() {
47                try {
48                        ResourceenvironmentFactory theResourceenvironmentFactory = (ResourceenvironmentFactory)EPackage.Registry.INSTANCE.getEFactory("http://sdq.ipd.uka.de/PalladioComponentModel/ResourceEnvironment/4.0"); 
49                        if (theResourceenvironmentFactory != null) {
50                                return theResourceenvironmentFactory;
51                        }
52                }
53                catch (Exception exception) {
54                        EcorePlugin.INSTANCE.log(exception);
55                }
56                return new ResourceenvironmentFactoryImpl();
57        }
58 
59        /**
60         * Creates an instance of the factory.
61         * <!-- begin-user-doc -->
62         * <!-- end-user-doc -->
63         * @generated
64         */
65        public ResourceenvironmentFactoryImpl() {
66                super();
67        }
68 
69        /**
70         * <!-- begin-user-doc -->
71         * <!-- end-user-doc -->
72         * @generated
73         */
74        @Override
75        public EObject create(EClass eClass) {
76                switch (eClass.getClassifierID()) {
77                        case ResourceenvironmentPackage.RESOURCE_ENVIRONMENT: return createResourceEnvironment();
78                        case ResourceenvironmentPackage.LINKING_RESOURCE: return createLinkingResource();
79                        case ResourceenvironmentPackage.RESOURCE_CONTAINER: return createResourceContainer();
80                        case ResourceenvironmentPackage.PROCESSING_RESOURCE_SPECIFICATION: return createProcessingResourceSpecification();
81                        case ResourceenvironmentPackage.COMMUNICATION_LINK_RESOURCE_SPECIFICATION: return createCommunicationLinkResourceSpecification();
82                        default:
83                                throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
84                }
85        }
86 
87        /**
88         * <!-- begin-user-doc -->
89         * <!-- end-user-doc -->
90         * @generated
91         */
92        @Override
93        public Object createFromString(EDataType eDataType, String initialValue) {
94                switch (eDataType.getClassifierID()) {
95                        case ResourceenvironmentPackage.CONTAINER_OPERATING_SYSTEM:
96                                return createContainerOperatingSystemFromString(eDataType, initialValue);
97                        case ResourceenvironmentPackage.SCHEDULING_POLICY:
98                                return createSchedulingPolicyFromString(eDataType, initialValue);
99                        default:
100                                throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
101                }
102        }
103 
104        /**
105         * <!-- begin-user-doc -->
106         * <!-- end-user-doc -->
107         * @generated
108         */
109        @Override
110        public String convertToString(EDataType eDataType, Object instanceValue) {
111                switch (eDataType.getClassifierID()) {
112                        case ResourceenvironmentPackage.CONTAINER_OPERATING_SYSTEM:
113                                return convertContainerOperatingSystemToString(eDataType, instanceValue);
114                        case ResourceenvironmentPackage.SCHEDULING_POLICY:
115                                return convertSchedulingPolicyToString(eDataType, instanceValue);
116                        default:
117                                throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
118                }
119        }
120 
121        /**
122         * <!-- begin-user-doc -->
123         * <!-- end-user-doc -->
124         * @generated
125         */
126        public ResourceEnvironment createResourceEnvironment() {
127                ResourceEnvironmentImpl resourceEnvironment = new ResourceEnvironmentImpl();
128                return resourceEnvironment;
129        }
130 
131        /**
132         * <!-- begin-user-doc -->
133         * <!-- end-user-doc -->
134         * @generated
135         */
136        public LinkingResource createLinkingResource() {
137                LinkingResourceImpl linkingResource = new LinkingResourceImpl();
138                return linkingResource;
139        }
140 
141        /**
142         * <!-- begin-user-doc -->
143         * <!-- end-user-doc -->
144         * @generated
145         */
146        public ResourceContainer createResourceContainer() {
147                ResourceContainerImpl resourceContainer = new ResourceContainerImpl();
148                return resourceContainer;
149        }
150 
151        /**
152         * <!-- begin-user-doc -->
153         * <!-- end-user-doc -->
154         * @generated
155         */
156        public ProcessingResourceSpecification createProcessingResourceSpecification() {
157                ProcessingResourceSpecificationImpl processingResourceSpecification = new ProcessingResourceSpecificationImpl();
158                return processingResourceSpecification;
159        }
160 
161        /**
162         * <!-- begin-user-doc -->
163         * <!-- end-user-doc -->
164         * @generated
165         */
166        public CommunicationLinkResourceSpecification createCommunicationLinkResourceSpecification() {
167                CommunicationLinkResourceSpecificationImpl communicationLinkResourceSpecification = new CommunicationLinkResourceSpecificationImpl();
168                return communicationLinkResourceSpecification;
169        }
170 
171        /**
172         * <!-- begin-user-doc -->
173         * <!-- end-user-doc -->
174         * @generated
175         */
176        public ContainerOperatingSystem createContainerOperatingSystemFromString(EDataType eDataType, String initialValue) {
177                ContainerOperatingSystem result = ContainerOperatingSystem.get(initialValue);
178                if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
179                return result;
180        }
181 
182        /**
183         * <!-- begin-user-doc -->
184         * <!-- end-user-doc -->
185         * @generated
186         */
187        public String convertContainerOperatingSystemToString(EDataType eDataType, Object instanceValue) {
188                return instanceValue == null ? null : instanceValue.toString();
189        }
190 
191        /**
192         * <!-- begin-user-doc -->
193         * <!-- end-user-doc -->
194         * @generated
195         */
196        public SchedulingPolicy createSchedulingPolicyFromString(EDataType eDataType, String initialValue) {
197                SchedulingPolicy result = SchedulingPolicy.get(initialValue);
198                if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
199                return result;
200        }
201 
202        /**
203         * <!-- begin-user-doc -->
204         * <!-- end-user-doc -->
205         * @generated
206         */
207        public String convertSchedulingPolicyToString(EDataType eDataType, Object instanceValue) {
208                return instanceValue == null ? null : instanceValue.toString();
209        }
210 
211        /**
212         * <!-- begin-user-doc -->
213         * <!-- end-user-doc -->
214         * @generated
215         */
216        public ResourceenvironmentPackage getResourceenvironmentPackage() {
217                return (ResourceenvironmentPackage)getEPackage();
218        }
219 
220        /**
221         * <!-- begin-user-doc -->
222         * <!-- end-user-doc -->
223         * @deprecated
224         * @generated
225         */
226        @Deprecated
227        public static ResourceenvironmentPackage getPackage() {
228                return ResourceenvironmentPackage.eINSTANCE;
229        }
230 
231} //ResourceenvironmentFactoryImpl

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