/** * <copyright> * </copyright> * * $Id$ */ package tefkat.engine.runtime.impl; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.ENotificationImpl; import tefkat.engine.runtime.RuntimePackage; import tefkat.engine.runtime.SimpleExpr; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Simple Expr</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link tefkat.engine.runtime.impl.SimpleExprImpl#getRepresentation <em>Representation</em>}</li> * </ul> * </p> * * @generated */ public abstract class SimpleExprImpl extends ExpressionImpl implements SimpleExpr { /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static final String copyright = "Copyright michael lawley 2004"; /** * The default value of the '{@link #getRepresentation() <em>Representation</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getRepresentation() * @generated * @ordered */ protected static final String REPRESENTATION_EDEFAULT = null; /** * The cached value of the '{@link #getRepresentation() <em>Representation</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getRepresentation() * @generated * @ordered */ protected String representation = REPRESENTATION_EDEFAULT; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected SimpleExprImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected EClass eStaticClass() { return RuntimePackage.Literals.SIMPLE_EXPR; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getRepresentation() { return representation; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setRepresentation(String newRepresentation) { String oldRepresentation = representation; representation = newRepresentation; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, RuntimePackage.SIMPLE_EXPR__REPRESENTATION, oldRepresentation, representation)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case RuntimePackage.SIMPLE_EXPR__REPRESENTATION: return getRepresentation(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void eSet(int featureID, Object newValue) { switch (featureID) { case RuntimePackage.SIMPLE_EXPR__REPRESENTATION: setRepresentation((String)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void eUnset(int featureID) { switch (featureID) { case RuntimePackage.SIMPLE_EXPR__REPRESENTATION: setRepresentation(REPRESENTATION_EDEFAULT); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public boolean eIsSet(int featureID) { switch (featureID) { case RuntimePackage.SIMPLE_EXPR__REPRESENTATION: return REPRESENTATION_EDEFAULT == null ? representation != null : !REPRESENTATION_EDEFAULT.equals(representation); } return super.eIsSet(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (representation: "); result.append(representation); result.append(')'); return result.toString(); } } //SimpleExprImpl