/**
 */
package org.xtext.example.mydsl6.myDsl6.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.xtext.example.mydsl6.myDsl6.*;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model <b>Factory</b>.
 * <!-- end-user-doc -->
 * @generated
 */
public class MyDsl6FactoryImpl extends EFactoryImpl implements MyDsl6Factory
{
  /**
   * Creates the default factory implementation.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public static MyDsl6Factory init()
  {
    try
    {
      MyDsl6Factory theMyDsl6Factory = (MyDsl6Factory)EPackage.Registry.INSTANCE.getEFactory("http://www.xtext.org/example/mydsl6/MyDsl6"); 
      if (theMyDsl6Factory != null)
      {
        return theMyDsl6Factory;
      }
    }
    catch (Exception exception)
    {
      EcorePlugin.INSTANCE.log(exception);
    }
    return new MyDsl6FactoryImpl();
  }

  /**
   * Creates an instance of the factory.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public MyDsl6FactoryImpl()
  {
    super();
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public EObject create(EClass eClass)
  {
    switch (eClass.getClassifierID())
    {
      case MyDsl6Package.CONTEXT: return createContext();
      case MyDsl6Package.CONTENTEXT_UNIT: return createContentextUnit();
      case MyDsl6Package.WEB_APPLICATION: return createWebApplication();
      case MyDsl6Package.COLLECTION: return createCollection();
      case MyDsl6Package.METHOD: return createMethod();
      case MyDsl6Package.FUNCTION: return createFunction();
      case MyDsl6Package.TYPE: return createType();
      case MyDsl6Package.FIELD: return createField();
      case MyDsl6Package.LOOK_UP: return createLookUp();
      case MyDsl6Package.TEXT_FIELD: return createTextField();
      default:
        throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
    }
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Context createContext()
  {
    ContextImpl context = new ContextImpl();
    return context;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public ContentextUnit createContentextUnit()
  {
    ContentextUnitImpl contentextUnit = new ContentextUnitImpl();
    return contentextUnit;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public WebApplication createWebApplication()
  {
    WebApplicationImpl webApplication = new WebApplicationImpl();
    return webApplication;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Collection createCollection()
  {
    CollectionImpl collection = new CollectionImpl();
    return collection;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Method createMethod()
  {
    MethodImpl method = new MethodImpl();
    return method;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Function createFunction()
  {
    FunctionImpl function = new FunctionImpl();
    return function;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Type createType()
  {
    TypeImpl type = new TypeImpl();
    return type;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Field createField()
  {
    FieldImpl field = new FieldImpl();
    return field;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public LookUp createLookUp()
  {
    LookUpImpl lookUp = new LookUpImpl();
    return lookUp;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public TextField createTextField()
  {
    TextFieldImpl textField = new TextFieldImpl();
    return textField;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public MyDsl6Package getMyDsl6Package()
  {
    return (MyDsl6Package)getEPackage();
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @deprecated
   * @generated
   */
  @Deprecated
  public static MyDsl6Package getPackage()
  {
    return MyDsl6Package.eINSTANCE;
  }

} //MyDsl6FactoryImpl
