Package ClassicalB.impl

Source Code of ClassicalB.impl.BRefinementImpl

/**
*/
package ClassicalB.impl;

import ClassicalB.BImplementation;
import ClassicalB.BRefinement;
import ClassicalB.ClassicalBPackage;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.ENotificationImpl;

/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>BRefinement</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
*   <li>{@link ClassicalB.impl.BRefinementImpl#getImplementation <em>Implementation</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class BRefinementImpl extends BModuleImpl implements BRefinement {
  /**
   * The cached value of the '{@link #getImplementation() <em>Implementation</em>}' reference.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getImplementation()
   * @generated
   * @ordered
   */
  protected BImplementation implementation;

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  protected BRefinementImpl() {
    super();
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  protected EClass eStaticClass() {
    return ClassicalBPackage.Literals.BREFINEMENT;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public BImplementation getImplementation() {
    if (implementation != null && implementation.eIsProxy()) {
      InternalEObject oldImplementation = (InternalEObject)implementation;
      implementation = (BImplementation)eResolveProxy(oldImplementation);
      if (implementation != oldImplementation) {
        if (eNotificationRequired())
          eNotify(new ENotificationImpl(this, Notification.RESOLVE, ClassicalBPackage.BREFINEMENT__IMPLEMENTATION, oldImplementation, implementation));
      }
    }
    return implementation;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public BImplementation basicGetImplementation() {
    return implementation;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setImplementation(BImplementation newImplementation) {
    BImplementation oldImplementation = implementation;
    implementation = newImplementation;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, ClassicalBPackage.BREFINEMENT__IMPLEMENTATION, oldImplementation, implementation));
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public Object eGet(int featureID, boolean resolve, boolean coreType) {
    switch (featureID) {
      case ClassicalBPackage.BREFINEMENT__IMPLEMENTATION:
        if (resolve) return getImplementation();
        return basicGetImplementation();
    }
    return super.eGet(featureID, resolve, coreType);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public void eSet(int featureID, Object newValue) {
    switch (featureID) {
      case ClassicalBPackage.BREFINEMENT__IMPLEMENTATION:
        setImplementation((BImplementation)newValue);
        return;
    }
    super.eSet(featureID, newValue);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public void eUnset(int featureID) {
    switch (featureID) {
      case ClassicalBPackage.BREFINEMENT__IMPLEMENTATION:
        setImplementation((BImplementation)null);
        return;
    }
    super.eUnset(featureID);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public boolean eIsSet(int featureID) {
    switch (featureID) {
      case ClassicalBPackage.BREFINEMENT__IMPLEMENTATION:
        return implementation != null;
    }
    return super.eIsSet(featureID);
  }

} //BRefinementImpl
TOP

Related Classes of ClassicalB.impl.BRefinementImpl

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.