/** * <copyright> * Copyright (c) 2008 Open Canarias 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: * A. Sanchez-Barbudo - initial API and implementation * * </copyright> * * $Id: MappingCallExpImpl.java,v 1.4 2009/02/20 11:04:08 radvorak Exp $ */ package org.eclipse.m2m.qvt.oml.ecore.QVTOperational.impl; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.m2m.qvt.oml.ecore.QVTOperational.MappingCallExp; import org.eclipse.m2m.qvt.oml.ecore.QVTOperational.QVTOperationalPackage; import org.eclipse.m2m.qvt.oml.ecore.QVTOperational.util.QVTOperationalVisitor; import org.eclipse.ocl.utilities.Visitor; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Mapping Call Exp</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link org.eclipse.m2m.qvt.oml.ecore.QVTOperational.impl.MappingCallExpImpl#isIsStrict <em>Is Strict</em>}</li> * </ul> * </p> * * @generated */ public class MappingCallExpImpl extends ImperativeCallExpImpl implements MappingCallExp { /** * The default value of the '{@link #isIsStrict() <em>Is Strict</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #isIsStrict() * @generated * @ordered */ protected static final boolean IS_STRICT_EDEFAULT = false; /** * The cached value of the '{@link #isIsStrict() <em>Is Strict</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #isIsStrict() * @generated * @ordered */ protected boolean isStrict = IS_STRICT_EDEFAULT; /** * This is true if the Is Strict attribute has been set. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ protected boolean isStrictESet; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected MappingCallExpImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return QVTOperationalPackage.Literals.MAPPING_CALL_EXP; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public boolean isIsStrict() { return isStrict; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setIsStrict(boolean newIsStrict) { boolean oldIsStrict = isStrict; isStrict = newIsStrict; boolean oldIsStrictESet = isStrictESet; isStrictESet = true; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, QVTOperationalPackage.MAPPING_CALL_EXP__IS_STRICT, oldIsStrict, isStrict, !oldIsStrictESet)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void unsetIsStrict() { boolean oldIsStrict = isStrict; boolean oldIsStrictESet = isStrictESet; isStrict = IS_STRICT_EDEFAULT; isStrictESet = false; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.UNSET, QVTOperationalPackage.MAPPING_CALL_EXP__IS_STRICT, oldIsStrict, IS_STRICT_EDEFAULT, oldIsStrictESet)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public boolean isSetIsStrict() { return isStrictESet; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case QVTOperationalPackage.MAPPING_CALL_EXP__IS_STRICT: return isIsStrict(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case QVTOperationalPackage.MAPPING_CALL_EXP__IS_STRICT: setIsStrict((Boolean)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case QVTOperationalPackage.MAPPING_CALL_EXP__IS_STRICT: unsetIsStrict(); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case QVTOperationalPackage.MAPPING_CALL_EXP__IS_STRICT: return isSetIsStrict(); } return super.eIsSet(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (isStrict: "); if (isStrictESet) result.append(isStrict); else result.append("<unset>"); result.append(')'); return result.toString(); } /** * @generated NOT */ @SuppressWarnings("unchecked") @Override public <T, U extends Visitor<T,?,?,?,?,?,?,?,?,?>> T accept(U v) { if (v instanceof QVTOperationalVisitor) return (T) ((QVTOperationalVisitor) v).visitMappingCallExp(this); return super.accept(v); } } //MappingCallExpImpl