/** * <copyright> * </copyright> * * $Id$ */ package org.eclipse.buckminster.cspecxml.impl; import org.eclipse.buckminster.cspecxml.IActionArtifact; import org.eclipse.buckminster.cspecxml.ICSpecXMLPackage; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.ENotificationImpl; /** * <!-- begin-user-doc --> An implementation of the model object ' * <em><b>Action Artifact</b></em>'. <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link org.eclipse.buckminster.cspecxml.impl.ActionArtifactImpl#getAlias * <em>Alias</em>}</li> * </ul> * </p> * * @generated */ public class ActionArtifactImpl extends ArtifactImpl implements IActionArtifact { /** * The default value of the '{@link #getAlias() <em>Alias</em>}' attribute. * <!-- begin-user-doc --> <!-- end-user-doc --> * * @see #getAlias() * @generated * @ordered */ protected static final String ALIAS_EDEFAULT = null; /** * The cached value of the '{@link #getAlias() <em>Alias</em>}' attribute. * <!-- begin-user-doc --> <!-- end-user-doc --> * * @see #getAlias() * @generated * @ordered */ protected String alias = ALIAS_EDEFAULT; /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ protected ActionArtifactImpl() { super(); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case ICSpecXMLPackage.ACTION_ARTIFACT__ALIAS: return getAlias(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case ICSpecXMLPackage.ACTION_ARTIFACT__ALIAS: return ALIAS_EDEFAULT == null ? alias != null : !ALIAS_EDEFAULT.equals(alias); } return super.eIsSet(featureID); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case ICSpecXMLPackage.ACTION_ARTIFACT__ALIAS: setAlias((String) newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case ICSpecXMLPackage.ACTION_ARTIFACT__ALIAS: setAlias(ALIAS_EDEFAULT); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ @Override public String getAlias() { return alias; } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ @Override public void setAlias(String newAlias) { String oldAlias = alias; alias = newAlias; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ICSpecXMLPackage.ACTION_ARTIFACT__ALIAS, oldAlias, alias)); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (alias: "); result.append(alias); result.append(')'); return result.toString(); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ @Override protected EClass eStaticClass() { return ICSpecXMLPackage.Literals.ACTION_ARTIFACT; } } // ActionArtifactImpl