blob: da51480e1139c7bd87791d382813fe99f2aee461 [file] [log] [blame]
/**
* <copyright>
* </copyright>
*
* $Id: ImperativeCallExpImpl.java,v 1.2 2009/02/20 12:55:55 radvorak Exp $
*/
package org.eclipse.m2m.qvt.oml.emof.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.emof.QVTOperational.ImperativeCallExp;
import org.eclipse.m2m.qvt.oml.emof.QVTOperational.QVTOperationalPackage;
import org.eclipse.qvt.declarative.emof.EssentialOCL.impl.OperationCallExpImpl;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Imperative Call Exp</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.m2m.qvt.oml.emof.QVTOperational.impl.ImperativeCallExpImpl#getIsVirtual <em>Is Virtual</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class ImperativeCallExpImpl extends OperationCallExpImpl implements ImperativeCallExp {
/**
* The default value of the '{@link #getIsVirtual() <em>Is Virtual</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getIsVirtual()
* @generated
* @ordered
*/
protected static final Boolean IS_VIRTUAL_EDEFAULT = Boolean.TRUE;
/**
* The cached value of the '{@link #getIsVirtual() <em>Is Virtual</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getIsVirtual()
* @generated
* @ordered
*/
protected Boolean isVirtual = IS_VIRTUAL_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ImperativeCallExpImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return QVTOperationalPackage.Literals.IMPERATIVE_CALL_EXP;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Boolean getIsVirtual() {
return isVirtual;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setIsVirtual(Boolean newIsVirtual) {
Boolean oldIsVirtual = isVirtual;
isVirtual = newIsVirtual;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, QVTOperationalPackage.IMPERATIVE_CALL_EXP__IS_VIRTUAL, oldIsVirtual, isVirtual));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case QVTOperationalPackage.IMPERATIVE_CALL_EXP__IS_VIRTUAL:
return getIsVirtual();
}
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.IMPERATIVE_CALL_EXP__IS_VIRTUAL:
setIsVirtual((Boolean)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case QVTOperationalPackage.IMPERATIVE_CALL_EXP__IS_VIRTUAL:
setIsVirtual(IS_VIRTUAL_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case QVTOperationalPackage.IMPERATIVE_CALL_EXP__IS_VIRTUAL:
return IS_VIRTUAL_EDEFAULT == null ? isVirtual != null : !IS_VIRTUAL_EDEFAULT.equals(isVirtual);
}
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(" (isVirtual: ");
result.append(isVirtual);
result.append(')');
return result.toString();
}
} //ImperativeCallExpImpl