blob: a20c855405fa9e120c90d84b9b7c4538df1f830c [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2018 Willink Transformations 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:
* Adolfo Sanchez-Barbudo Herrera - initial API and implementation
*******************************************************************************/
/**
* generated by Xtext 2.10.0
*/
package org.eclipse.qvtd.doc.minioclcs.impl;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.qvtd.doc.minioclcs.MinioclcsPackage;
import org.eclipse.qvtd.doc.minioclcs.PathElementCS;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Path Element CS</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.qvtd.doc.minioclcs.impl.PathElementCSImpl#getElementName <em>Element Name</em>}</li>
* </ul>
*
* @generated
*/
public class PathElementCSImpl extends CSTraceImpl implements PathElementCS
{
/**
* The default value of the '{@link #getElementName() <em>Element Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getElementName()
* @generated
* @ordered
*/
protected static final String ELEMENT_NAME_EDEFAULT = null;
/**
* The cached value of the '{@link #getElementName() <em>Element Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getElementName()
* @generated
* @ordered
*/
protected String elementName = ELEMENT_NAME_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected PathElementCSImpl()
{
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass()
{
return MinioclcsPackage.Literals.PATH_ELEMENT_CS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getElementName()
{
return elementName;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setElementName(String newElementName)
{
String oldElementName = elementName;
elementName = newElementName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, MinioclcsPackage.PATH_ELEMENT_CS__ELEMENT_NAME, oldElementName, elementName));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType)
{
switch (featureID) {
case MinioclcsPackage.PATH_ELEMENT_CS__ELEMENT_NAME:
return getElementName();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue)
{
switch (featureID) {
case MinioclcsPackage.PATH_ELEMENT_CS__ELEMENT_NAME:
setElementName((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID)
{
switch (featureID) {
case MinioclcsPackage.PATH_ELEMENT_CS__ELEMENT_NAME:
setElementName(ELEMENT_NAME_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID)
{
switch (featureID) {
case MinioclcsPackage.PATH_ELEMENT_CS__ELEMENT_NAME:
return ELEMENT_NAME_EDEFAULT == null ? elementName != null : !ELEMENT_NAME_EDEFAULT.equals(elementName);
}
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(" (elementName: ");
result.append(elementName);
result.append(')');
return result.toString();
}
} //PathElementCSImpl