/**
 */
package de.ugoe.cs.swe.bnftools.ebnf.impl;

import de.ugoe.cs.swe.bnftools.ebnf.*;

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;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model <b>Factory</b>.
 * <!-- end-user-doc -->
 * @generated
 */
public class EbnfFactoryImpl extends EFactoryImpl implements EbnfFactory
{
  /**
   * Creates the default factory implementation.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public static EbnfFactory init()
  {
    try
    {
      EbnfFactory theEbnfFactory = (EbnfFactory)EPackage.Registry.INSTANCE.getEFactory(EbnfPackage.eNS_URI);
      if (theEbnfFactory != null)
      {
        return theEbnfFactory;
      }
    }
    catch (Exception exception)
    {
      EcorePlugin.INSTANCE.log(exception);
    }
    return new EbnfFactoryImpl();
  }

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

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public EObject create(EClass eClass)
  {
    switch (eClass.getClassifierID())
    {
      case EbnfPackage.ETSI_BNF: return createEtsiBnf();
      case EbnfPackage.IMPORT_SECTION: return createImportSection();
      case EbnfPackage.BNF_ENTRY: return createBnfEntry();
      case EbnfPackage.DELTA_ENTRY: return createDeltaEntry();
      case EbnfPackage.MERGE_ENTRY: return createMergeEntry();
      case EbnfPackage.SECTION_HEADING: return createSectionHeading();
      case EbnfPackage.IMPORT: return createImport();
      case EbnfPackage.RULE: return createRule();
      case EbnfPackage.EXT_RULE: return createExtRule();
      case EbnfPackage.MERGE_RULE: return createMergeRule();
      case EbnfPackage.GLOBAL_COMBINATOR: return createGlobalCombinator();
      case EbnfPackage.RULE_COMBINATOR: return createRuleCombinator();
      case EbnfPackage.HOOK_COMBINATOR: return createHookCombinator();
      case EbnfPackage.DEFINITION_LIST: return createDefinitionList();
      case EbnfPackage.SINGLE_DEFINITION: return createSingleDefinition();
      case EbnfPackage.TERM: return createTerm();
      case EbnfPackage.ATOM: return createAtom();
      case EbnfPackage.RULE_REFERENCE: return createRuleReference();
      case EbnfPackage.STRING_RULE: return createStringRule();
      case EbnfPackage.GROUPED_SEQUENCE: return createGroupedSequence();
      case EbnfPackage.OPTIONAL_SEQUENCE: return createOptionalSequence();
      case EbnfPackage.REPEATED_SEQUENCE: return createRepeatedSequence();
      default:
        throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
    }
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EtsiBnf createEtsiBnf()
  {
    EtsiBnfImpl etsiBnf = new EtsiBnfImpl();
    return etsiBnf;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public ImportSection createImportSection()
  {
    ImportSectionImpl importSection = new ImportSectionImpl();
    return importSection;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public BnfEntry createBnfEntry()
  {
    BnfEntryImpl bnfEntry = new BnfEntryImpl();
    return bnfEntry;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public DeltaEntry createDeltaEntry()
  {
    DeltaEntryImpl deltaEntry = new DeltaEntryImpl();
    return deltaEntry;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public MergeEntry createMergeEntry()
  {
    MergeEntryImpl mergeEntry = new MergeEntryImpl();
    return mergeEntry;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public SectionHeading createSectionHeading()
  {
    SectionHeadingImpl sectionHeading = new SectionHeadingImpl();
    return sectionHeading;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Import createImport()
  {
    ImportImpl import_ = new ImportImpl();
    return import_;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Rule createRule()
  {
    RuleImpl rule = new RuleImpl();
    return rule;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public ExtRule createExtRule()
  {
    ExtRuleImpl extRule = new ExtRuleImpl();
    return extRule;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public MergeRule createMergeRule()
  {
    MergeRuleImpl mergeRule = new MergeRuleImpl();
    return mergeRule;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public GlobalCombinator createGlobalCombinator()
  {
    GlobalCombinatorImpl globalCombinator = new GlobalCombinatorImpl();
    return globalCombinator;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public RuleCombinator createRuleCombinator()
  {
    RuleCombinatorImpl ruleCombinator = new RuleCombinatorImpl();
    return ruleCombinator;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public HookCombinator createHookCombinator()
  {
    HookCombinatorImpl hookCombinator = new HookCombinatorImpl();
    return hookCombinator;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public DefinitionList createDefinitionList()
  {
    DefinitionListImpl definitionList = new DefinitionListImpl();
    return definitionList;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public SingleDefinition createSingleDefinition()
  {
    SingleDefinitionImpl singleDefinition = new SingleDefinitionImpl();
    return singleDefinition;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Term createTerm()
  {
    TermImpl term = new TermImpl();
    return term;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Atom createAtom()
  {
    AtomImpl atom = new AtomImpl();
    return atom;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public RuleReference createRuleReference()
  {
    RuleReferenceImpl ruleReference = new RuleReferenceImpl();
    return ruleReference;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public StringRule createStringRule()
  {
    StringRuleImpl stringRule = new StringRuleImpl();
    return stringRule;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public GroupedSequence createGroupedSequence()
  {
    GroupedSequenceImpl groupedSequence = new GroupedSequenceImpl();
    return groupedSequence;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public OptionalSequence createOptionalSequence()
  {
    OptionalSequenceImpl optionalSequence = new OptionalSequenceImpl();
    return optionalSequence;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public RepeatedSequence createRepeatedSequence()
  {
    RepeatedSequenceImpl repeatedSequence = new RepeatedSequenceImpl();
    return repeatedSequence;
  }

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

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

} //EbnfFactoryImpl
