| /** |
| * Copyright (c) 2010,2015 E.D.Willink and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * E.D.Willink - Initial API and implementation |
| */ |
| package org.eclipse.ocl.xtext.basecs.impl; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| import org.eclipse.emf.ecore.EClass; |
| |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| import org.eclipse.ocl.xtext.basecs.BaseCSPackage; |
| import org.eclipse.ocl.xtext.basecs.FeatureCS; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Feature CS</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.ocl.xtext.basecs.impl.FeatureCSImpl#isIsDefinition <em>Is Definition</em>}</li> |
| * <li>{@link org.eclipse.ocl.xtext.basecs.impl.FeatureCSImpl#isIsDerived <em>Is Derived</em>}</li> |
| * <li>{@link org.eclipse.ocl.xtext.basecs.impl.FeatureCSImpl#isIsStatic <em>Is Static</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public abstract class FeatureCSImpl extends TypedElementCSImpl implements FeatureCS |
| { |
| /** |
| * The default value of the '{@link #isIsDefinition() <em>Is Definition</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isIsDefinition() |
| * @generated |
| * @ordered |
| */ |
| protected static final boolean IS_DEFINITION_EDEFAULT = false; |
| /** |
| * The cached value of the '{@link #isIsDefinition() <em>Is Definition</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isIsDefinition() |
| * @generated |
| * @ordered |
| */ |
| protected boolean isDefinition = IS_DEFINITION_EDEFAULT; |
| /** |
| * The default value of the '{@link #isIsDerived() <em>Is Derived</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isIsDerived() |
| * @generated |
| * @ordered |
| */ |
| protected static final boolean IS_DERIVED_EDEFAULT = false; |
| /** |
| * The cached value of the '{@link #isIsDerived() <em>Is Derived</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isIsDerived() |
| * @generated |
| * @ordered |
| */ |
| protected boolean isDerived = IS_DERIVED_EDEFAULT; |
| /** |
| * The default value of the '{@link #isIsStatic() <em>Is Static</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isIsStatic() |
| * @generated |
| * @ordered |
| */ |
| protected static final boolean IS_STATIC_EDEFAULT = false; |
| /** |
| * The cached value of the '{@link #isIsStatic() <em>Is Static</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isIsStatic() |
| * @generated |
| * @ordered |
| */ |
| protected boolean isStatic = IS_STATIC_EDEFAULT; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected FeatureCSImpl() |
| { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() |
| { |
| return BaseCSPackage.Literals.FEATURE_CS; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean isIsDefinition() |
| { |
| return isDefinition; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void setIsDefinition(boolean newIsDefinition) |
| { |
| boolean oldIsDefinition = isDefinition; |
| isDefinition = newIsDefinition; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, BaseCSPackage.FEATURE_CS__IS_DEFINITION, oldIsDefinition, isDefinition)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean isIsDerived() |
| { |
| return isDerived; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void setIsDerived(boolean newIsDerived) |
| { |
| boolean oldIsDerived = isDerived; |
| isDerived = newIsDerived; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, BaseCSPackage.FEATURE_CS__IS_DERIVED, oldIsDerived, isDerived)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean isIsStatic() |
| { |
| return isStatic; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void setIsStatic(boolean newIsStatic) |
| { |
| boolean oldIsStatic = isStatic; |
| isStatic = newIsStatic; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, BaseCSPackage.FEATURE_CS__IS_STATIC, oldIsStatic, isStatic)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public String toString() |
| { |
| return super.toString(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) |
| { |
| switch (featureID) |
| { |
| case BaseCSPackage.FEATURE_CS__IS_DEFINITION: |
| return isIsDefinition(); |
| case BaseCSPackage.FEATURE_CS__IS_DERIVED: |
| return isIsDerived(); |
| case BaseCSPackage.FEATURE_CS__IS_STATIC: |
| return isIsStatic(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) |
| { |
| switch (featureID) |
| { |
| case BaseCSPackage.FEATURE_CS__IS_DEFINITION: |
| setIsDefinition((Boolean)newValue); |
| return; |
| case BaseCSPackage.FEATURE_CS__IS_DERIVED: |
| setIsDerived((Boolean)newValue); |
| return; |
| case BaseCSPackage.FEATURE_CS__IS_STATIC: |
| setIsStatic((Boolean)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) |
| { |
| switch (featureID) |
| { |
| case BaseCSPackage.FEATURE_CS__IS_DEFINITION: |
| setIsDefinition(IS_DEFINITION_EDEFAULT); |
| return; |
| case BaseCSPackage.FEATURE_CS__IS_DERIVED: |
| setIsDerived(IS_DERIVED_EDEFAULT); |
| return; |
| case BaseCSPackage.FEATURE_CS__IS_STATIC: |
| setIsStatic(IS_STATIC_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) |
| { |
| switch (featureID) |
| { |
| case BaseCSPackage.FEATURE_CS__IS_DEFINITION: |
| return isDefinition != IS_DEFINITION_EDEFAULT; |
| case BaseCSPackage.FEATURE_CS__IS_DERIVED: |
| return isDerived != IS_DERIVED_EDEFAULT; |
| case BaseCSPackage.FEATURE_CS__IS_STATIC: |
| return isStatic != IS_STATIC_EDEFAULT; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| |
| } //FeatureCSImpl |