| /** |
| */ |
| package org.eclipse.qvto.examples.xtext.qvtoperationalcs.impl; |
| |
| import java.lang.reflect.InvocationTargetException; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| import org.eclipse.emf.common.util.WrappedException; |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.EOperation; |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| import org.eclipse.ocl.xtext.basecs.impl.StructuredClassCSImpl; |
| import org.eclipse.ocl.xtext.basecs.util.BaseCSVisitor; |
| import org.eclipse.qvto.examples.xtext.qvtoperationalcs.QVTOperationalCSPackage; |
| import org.eclipse.qvto.examples.xtext.qvtoperationalcs.QVToClassCS; |
| import org.eclipse.qvto.examples.xtext.qvtoperationalcs.util.QVTOperationalCSVisitor; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>QV To Class CS</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.qvto.examples.xtext.qvtoperationalcs.impl.QVToClassCSImpl#isIntermediate <em>Intermediate</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class QVToClassCSImpl extends StructuredClassCSImpl implements QVToClassCS { |
| /** |
| * The default value of the '{@link #isIntermediate() <em>Intermediate</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isIntermediate() |
| * @generated |
| * @ordered |
| */ |
| protected static final boolean INTERMEDIATE_EDEFAULT = false; |
| |
| /** |
| * The cached value of the '{@link #isIntermediate() <em>Intermediate</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isIntermediate() |
| * @generated |
| * @ordered |
| */ |
| protected boolean intermediate = INTERMEDIATE_EDEFAULT; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected QVToClassCSImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return QVTOperationalCSPackage.Literals.QV_TO_CLASS_CS; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isIntermediate() { |
| return intermediate; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setIntermediate(boolean newIntermediate) { |
| boolean oldIntermediate = intermediate; |
| intermediate = newIntermediate; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, QVTOperationalCSPackage.QV_TO_CLASS_CS__INTERMEDIATE, oldIntermediate, intermediate)); |
| } |
| |
| /** |
| * The cached invocation delegate for the '{@link #ast() <em>Ast</em>}' operation. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #ast() |
| * @generated |
| * @ordered |
| */ |
| protected static final EOperation.Internal.InvocationDelegate AST__EINVOCATION_DELEGATE = ((EOperation.Internal)QVTOperationalCSPackage.Literals.QV_TO_CLASS_CS.getEOperations().get(0)).getInvocationDelegate(); |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public org.eclipse.ocl.pivot.Class ast() { |
| try { |
| return (org.eclipse.ocl.pivot.Class)AST__EINVOCATION_DELEGATE.dynamicInvoke(this, null); |
| } |
| catch (InvocationTargetException ite) { |
| throw new WrappedException(ite); |
| } |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| 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 QVTOperationalCSPackage.QV_TO_CLASS_CS__INTERMEDIATE: |
| return isIntermediate(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case QVTOperationalCSPackage.QV_TO_CLASS_CS__INTERMEDIATE: |
| setIntermediate((Boolean)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case QVTOperationalCSPackage.QV_TO_CLASS_CS__INTERMEDIATE: |
| setIntermediate(INTERMEDIATE_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case QVTOperationalCSPackage.QV_TO_CLASS_CS__INTERMEDIATE: |
| return intermediate != INTERMEDIATE_EDEFAULT; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| /** |
| * {@inheritDoc} |
| * @generated |
| */ |
| @SuppressWarnings("unchecked") |
| @Override |
| public <R> R accept(BaseCSVisitor<R> visitor) { |
| return (R) ((QVTOperationalCSVisitor<?>)visitor).visitQVToClassCS(this); |
| } |
| |
| } //QVToClassCSImpl |