content: /**
   */
  package com.intel.llvm.ireditor.lLVM_IR.impl;
  
  import com.intel.llvm.ireditor.lLVM_IR.LLVM_IRPackage;
  import com.intel.llvm.ireditor.lLVM_IR.NamedMiddleInstruction;
  
  import org.eclipse.emf.common.notify.Notification;
  import org.eclipse.emf.common.notify.NotificationChain;
  
  import org.eclipse.emf.ecore.EClass;
  import org.eclipse.emf.ecore.EObject;
  import org.eclipse.emf.ecore.InternalEObject;
  
  import org.eclipse.emf.ecore.impl.ENotificationImpl;
  
  /**
   * <!-- begin-user-doc -->
   * An implementation of the model object '<em><b>Named Middle Instruction</b></em>'.
   * <!-- end-user-doc -->
   * <p>
   * The following features are implemented:
   * <ul>
   *   <li>{@link com.intel.llvm.ireditor.lLVM_IR.impl.NamedMiddleInstructionImpl#getInstruction <em>Instruction</em>}</li>
   * </ul>
   * </p>
   *
   * @generated
   */
  public class NamedMiddleInstructionImpl extends NamedInstructionImpl implements NamedMiddleInstruction
  {
    /**
     * The cached value of the '{@link #getInstruction() <em>Instruction</em>}' containment reference.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getInstruction()
     * @generated
     * @ordered
     */
    protected EObject instruction;
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    protected NamedMiddleInstructionImpl()
    {
      super();
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    protected EClass eStaticClass()
    {
      return LLVM_IRPackage.Literals.NAMED_MIDDLE_INSTRUCTION;
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EObject getInstruction()
    {
      return instruction;
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetInstruction(EObject newInstruction, NotificationChain msgs)
    {
      EObject oldInstruction = instruction;
      instruction = newInstruction;
      if (eNotificationRequired())
      {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, LLVM_IRPackage.NAMED_MIDDLE_INSTRUCTION__INSTRUCTION, oldInstruction, newInstruction);
        if (msgs == null) msgs = notification; else msgs.add(notification);
      }
      return msgs;
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setInstruction(EObject newInstruction)
    {
      if (newInstruction != instruction)
      {
        NotificationChain msgs = null;
        if (instruction != null)
          msgs = ((InternalEObject)instruction).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - LLVM_IRPackage.NAMED_MIDDLE_INSTRUCTION__INSTRUCTION, null, msgs);
        if (newInstruction != null)
          msgs = ((InternalEObject)newInstruction).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - LLVM_IRPackage.NAMED_MIDDLE_INSTRUCTION__INSTRUCTION, null, msgs);
        msgs = basicSetInstruction(newInstruction, msgs);
        if (msgs != null) msgs.dispatch();
      }
      else if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, LLVM_IRPackage.NAMED_MIDDLE_INSTRUCTION__INSTRUCTION, newInstruction, newInstruction));
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
    {
      switch (featureID)
      {
        case LLVM_IRPackage.NAMED_MIDDLE_INSTRUCTION__INSTRUCTION:
          return basicSetInstruction(null, msgs);
      }
      return super.eInverseRemove(otherEnd, featureID, msgs);
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public Object eGet(int featureID, boolean resolve, boolean coreType)
    {
      switch (featureID)
      {
        case LLVM_IRPackage.NAMED_MIDDLE_INSTRUCTION__INSTRUCTION:
          return getInstruction();
      }
      return super.eGet(featureID, resolve, coreType);
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public void eSet(int featureID, Object newValue)
    {
      switch (featureID)
      {
        case LLVM_IRPackage.NAMED_MIDDLE_INSTRUCTION__INSTRUCTION:
          setInstruction((EObject)newValue);
          return;
      }
      super.eSet(featureID, newValue);
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public void eUnset(int featureID)
    {
      switch (featureID)
      {
        case LLVM_IRPackage.NAMED_MIDDLE_INSTRUCTION__INSTRUCTION:
          setInstruction((EObject)null);
          return;
      }
      super.eUnset(featureID);
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public boolean eIsSet(int featureID)
    {
      switch (featureID)
      {
        case LLVM_IRPackage.NAMED_MIDDLE_INSTRUCTION__INSTRUCTION:
          return instruction != null;
      }
      return super.eIsSet(featureID);
    }
  
  } //NamedMiddleInstructionImpl
  