| /** |
| * Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf), Loetz GmbH&Co.KG (Heidelberg) |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License 2.0 |
| * which accompanies this distribution, and is available at |
| * https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| * Contributors: |
| * Florian Pirchner - Initial implementation |
| * |
| * generated by Xtext 2.11.0 |
| |
| */ |
| package org.eclipse.xtext.example.domainmodel.domainmodel.impl; |
| |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.EObject; |
| import org.eclipse.emf.ecore.EPackage; |
| |
| import org.eclipse.emf.ecore.impl.EFactoryImpl; |
| |
| import org.eclipse.emf.ecore.plugin.EcorePlugin; |
| |
| import org.eclipse.xtext.example.domainmodel.domainmodel.*; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model <b>Factory</b>. |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public class DomainmodelFactoryImpl extends EFactoryImpl implements DomainmodelFactory |
| { |
| /** |
| * Creates the default factory implementation. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public static DomainmodelFactory init() |
| { |
| try |
| { |
| DomainmodelFactory theDomainmodelFactory = (DomainmodelFactory)EPackage.Registry.INSTANCE.getEFactory(DomainmodelPackage.eNS_URI); |
| if (theDomainmodelFactory != null) |
| { |
| return theDomainmodelFactory; |
| } |
| } |
| catch (Exception exception) |
| { |
| EcorePlugin.INSTANCE.log(exception); |
| } |
| return new DomainmodelFactoryImpl(); |
| } |
| |
| /** |
| * Creates an instance of the factory. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public DomainmodelFactoryImpl() |
| { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EObject create(EClass eClass) |
| { |
| switch (eClass.getClassifierID()) |
| { |
| case DomainmodelPackage.DOMAIN_MODEL: return createDomainModel(); |
| case DomainmodelPackage.ABSTRACT_ELEMENT: return createAbstractElement(); |
| case DomainmodelPackage.PACKAGE_DECLARATION: return createPackageDeclaration(); |
| case DomainmodelPackage.ENTITY: return createEntity(); |
| case DomainmodelPackage.FEATURE: return createFeature(); |
| case DomainmodelPackage.PROPERTY: return createProperty(); |
| case DomainmodelPackage.OPERATION: return createOperation(); |
| default: |
| throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); |
| } |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public DomainModel createDomainModel() |
| { |
| DomainModelImpl domainModel = new DomainModelImpl(); |
| return domainModel; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public AbstractElement createAbstractElement() |
| { |
| AbstractElementImpl abstractElement = new AbstractElementImpl(); |
| return abstractElement; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public PackageDeclaration createPackageDeclaration() |
| { |
| PackageDeclarationImpl packageDeclaration = new PackageDeclarationImpl(); |
| return packageDeclaration; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Entity createEntity() |
| { |
| EntityImpl entity = new EntityImpl(); |
| return entity; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Feature createFeature() |
| { |
| FeatureImpl feature = new FeatureImpl(); |
| return feature; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Property createProperty() |
| { |
| PropertyImpl property = new PropertyImpl(); |
| return property; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Operation createOperation() |
| { |
| OperationImpl operation = new OperationImpl(); |
| return operation; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public DomainmodelPackage getDomainmodelPackage() |
| { |
| return (DomainmodelPackage)getEPackage(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @deprecated |
| * @generated |
| */ |
| @Deprecated |
| public static DomainmodelPackage getPackage() |
| { |
| return DomainmodelPackage.eINSTANCE; |
| } |
| |
| } //DomainmodelFactoryImpl |