org.eclipse.ocl.cst.impl.OperationCallExpCSImpl Maven / Gradle / Ivy
/**
*
*
* Copyright (c) 2005, 2008 IBM Corporation, Zeligsoft Inc., 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:
* IBM - Initial API and implementation
* Zeligsoft - Bug 243976
*
*
*
* $Id: OperationCallExpCSImpl.java,v 1.6 2009/10/15 19:38:06 ewillink Exp $
*/
package org.eclipse.ocl.cst.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.cst.CSTPackage;
import org.eclipse.ocl.cst.OperationCallExpCS;
/**
*
* An implementation of the model object 'Operation Call Exp CS'.
*
*
* The following features are implemented:
*
* - {@link org.eclipse.ocl.cst.impl.OperationCallExpCSImpl#getIsAtomic Is Atomic}
*
*
*
* @generated
*/
public class OperationCallExpCSImpl
extends FeatureCallExpCSImpl
implements OperationCallExpCS {
/**
* The default value of the '{@link #getIsAtomic() Is Atomic}' attribute.
*
* @since 3.0
*
* @see #getIsAtomic()
* @generated
* @ordered
*/
protected static final Boolean IS_ATOMIC_EDEFAULT = Boolean.FALSE;
/**
* The cached value of the '{@link #getIsAtomic() Is Atomic}' attribute.
*
* @since 3.0
*
* @see #getIsAtomic()
* @generated
* @ordered
*/
protected Boolean isAtomic = IS_ATOMIC_EDEFAULT;
/**
*
*
* @generated
*/
protected OperationCallExpCSImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return CSTPackage.Literals.OPERATION_CALL_EXP_CS;
}
/**
*
* @since 3.0
*
* @generated
*/
public Boolean getIsAtomic() {
return isAtomic;
}
/**
*
* @since 3.0
*
* @generated
*/
public void setIsAtomic(Boolean newIsAtomic) {
Boolean oldIsAtomic = isAtomic;
isAtomic = newIsAtomic;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET,
CSTPackage.OPERATION_CALL_EXP_CS__IS_ATOMIC, oldIsAtomic,
isAtomic));
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case CSTPackage.OPERATION_CALL_EXP_CS__IS_ATOMIC :
return getIsAtomic();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case CSTPackage.OPERATION_CALL_EXP_CS__IS_ATOMIC :
setIsAtomic((Boolean) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case CSTPackage.OPERATION_CALL_EXP_CS__IS_ATOMIC :
setIsAtomic(IS_ATOMIC_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case CSTPackage.OPERATION_CALL_EXP_CS__IS_ATOMIC :
return IS_ATOMIC_EDEFAULT == null
? isAtomic != null
: !IS_ATOMIC_EDEFAULT.equals(isAtomic);
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
@Override
public String toString() {
if (eIsProxy())
return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (isAtomic: "); //$NON-NLS-1$
result.append(isAtomic);
result.append(')');
return result.toString();
}
} //OperationCallExpCSImpl