imakerplugin/com.nokia.s60tools.imaker/src/com/nokia/s60tools/imaker/internal/iqrf/impl/IQRFFactoryImpl.java
changeset 0 61163b28edca
equal deleted inserted replaced
-1:000000000000 0:61163b28edca
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 package com.nokia.s60tools.imaker.internal.iqrf.impl;
       
    18 
       
    19 
       
    20 import org.eclipse.emf.ecore.EClass;
       
    21 import org.eclipse.emf.ecore.EObject;
       
    22 import org.eclipse.emf.ecore.EPackage;
       
    23 import org.eclipse.emf.ecore.impl.EFactoryImpl;
       
    24 import org.eclipse.emf.ecore.plugin.EcorePlugin;
       
    25 
       
    26 import com.nokia.s60tools.imaker.internal.iqrf.Configuration;
       
    27 import com.nokia.s60tools.imaker.internal.iqrf.ConfigurationElement;
       
    28 import com.nokia.s60tools.imaker.internal.iqrf.IMaker;
       
    29 import com.nokia.s60tools.imaker.internal.iqrf.IQRFFactory;
       
    30 import com.nokia.s60tools.imaker.internal.iqrf.IQRFPackage;
       
    31 import com.nokia.s60tools.imaker.internal.iqrf.Interface;
       
    32 import com.nokia.s60tools.imaker.internal.iqrf.Result;
       
    33 import com.nokia.s60tools.imaker.internal.iqrf.Setting;
       
    34 import com.nokia.s60tools.imaker.internal.iqrf.Target;
       
    35 
       
    36 /**
       
    37  * <!-- begin-user-doc -->
       
    38  * An implementation of the model <b>Factory</b>.
       
    39  * <!-- end-user-doc -->
       
    40  * @generated
       
    41  */
       
    42 public class IQRFFactoryImpl extends EFactoryImpl implements IQRFFactory {
       
    43 	/**
       
    44 	 * Creates the default factory implementation.
       
    45 	 * <!-- begin-user-doc -->
       
    46 	 * <!-- end-user-doc -->
       
    47 	 * @generated
       
    48 	 */
       
    49 	public static IQRFFactory init() {
       
    50 		try {
       
    51 			IQRFFactory theIQRFFactory = (IQRFFactory)EPackage.Registry.INSTANCE.getEFactory("iqrf"); 
       
    52 			if (theIQRFFactory != null) {
       
    53 				return theIQRFFactory;
       
    54 			}
       
    55 		}
       
    56 		catch (Exception exception) {
       
    57 			EcorePlugin.INSTANCE.log(exception);
       
    58 		}
       
    59 		return new IQRFFactoryImpl();
       
    60 	}
       
    61 
       
    62 	/**
       
    63 	 * Creates an instance of the factory.
       
    64 	 * <!-- begin-user-doc -->
       
    65 	 * <!-- end-user-doc -->
       
    66 	 * @generated
       
    67 	 */
       
    68 	public IQRFFactoryImpl() {
       
    69 		super();
       
    70 	}
       
    71 
       
    72 	/**
       
    73 	 * <!-- begin-user-doc -->
       
    74 	 * <!-- end-user-doc -->
       
    75 	 * @generated
       
    76 	 */
       
    77 	public EObject create(EClass eClass) {
       
    78 		switch (eClass.getClassifierID()) {
       
    79 			case IQRFPackage.RESULT: return createResult();
       
    80 			case IQRFPackage.CONFIGURATION: return createConfiguration();
       
    81 			case IQRFPackage.SETTING: return createSetting();
       
    82 			case IQRFPackage.INTERFACE: return createInterface();
       
    83 			case IQRFPackage.CONFIGURATION_ELEMENT: return createConfigurationElement();
       
    84 			case IQRFPackage.TARGET: return createTarget();
       
    85 			case IQRFPackage.IMAKER: return createIMaker();
       
    86 			default:
       
    87 				throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
       
    88 		}
       
    89 	}
       
    90 
       
    91 	/**
       
    92 	 * <!-- begin-user-doc -->
       
    93 	 * <!-- end-user-doc -->
       
    94 	 * @generated
       
    95 	 */
       
    96 	public Result createResult() {
       
    97 		ResultImpl result = new ResultImpl();
       
    98 		return result;
       
    99 	}
       
   100 
       
   101 	/**
       
   102 	 * <!-- begin-user-doc -->
       
   103 	 * <!-- end-user-doc -->
       
   104 	 * @generated
       
   105 	 */
       
   106 	public Configuration createConfiguration() {
       
   107 		ConfigurationImpl configuration = new ConfigurationImpl();
       
   108 		return configuration;
       
   109 	}
       
   110 
       
   111 	/**
       
   112 	 * <!-- begin-user-doc -->
       
   113 	 * <!-- end-user-doc -->
       
   114 	 * @generated
       
   115 	 */
       
   116 	public Setting createSetting() {
       
   117 		SettingImpl setting = new SettingImpl();
       
   118 		return setting;
       
   119 	}
       
   120 
       
   121 	/**
       
   122 	 * <!-- begin-user-doc -->
       
   123 	 * <!-- end-user-doc -->
       
   124 	 * @generated
       
   125 	 */
       
   126 	public Interface createInterface() {
       
   127 		InterfaceImpl interface_ = new InterfaceImpl();
       
   128 		return interface_;
       
   129 	}
       
   130 
       
   131 	/**
       
   132 	 * <!-- begin-user-doc -->
       
   133 	 * <!-- end-user-doc -->
       
   134 	 * @generated
       
   135 	 */
       
   136 	public ConfigurationElement createConfigurationElement() {
       
   137 		ConfigurationElementImpl configurationElement = new ConfigurationElementImpl();
       
   138 		return configurationElement;
       
   139 	}
       
   140 
       
   141 	/**
       
   142 	 * <!-- begin-user-doc -->
       
   143 	 * <!-- end-user-doc -->
       
   144 	 * @generated
       
   145 	 */
       
   146 	public Target createTarget() {
       
   147 		TargetImpl target = new TargetImpl();
       
   148 		return target;
       
   149 	}
       
   150 
       
   151 	/**
       
   152 	 * <!-- begin-user-doc -->
       
   153 	 * <!-- end-user-doc -->
       
   154 	 * @generated
       
   155 	 */
       
   156 	public IMaker createIMaker() {
       
   157 		IMakerImpl iMaker = new IMakerImpl();
       
   158 		return iMaker;
       
   159 	}
       
   160 
       
   161 	/**
       
   162 	 * <!-- begin-user-doc -->
       
   163 	 * <!-- end-user-doc -->
       
   164 	 * @generated
       
   165 	 */
       
   166 	public IQRFPackage getIQRFPackage() {
       
   167 		return (IQRFPackage)getEPackage();
       
   168 	}
       
   169 
       
   170 	/**
       
   171 	 * <!-- begin-user-doc -->
       
   172 	 * <!-- end-user-doc -->
       
   173 	 * @deprecated
       
   174 	 * @generated
       
   175 	 */
       
   176 	public static IQRFPackage getPackage() {
       
   177 		return IQRFPackage.eINSTANCE;
       
   178 	}
       
   179 
       
   180 } //IQRFFactoryImpl