org.openxma.dsl.dom.model.impl.InClassImpl Maven / Gradle / Ivy
/**
*
*
*
* $Id$
*/
package org.openxma.dsl.dom.model.impl;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.openxma.dsl.dom.DomPackage;
import org.openxma.dsl.dom.model.InClass;
/**
*
* An implementation of the model object 'In Class'.
*
*
* The following features are implemented:
*
* - {@link org.openxma.dsl.dom.model.impl.InClassImpl#getName Name}
* - {@link org.openxma.dsl.dom.model.impl.InClassImpl#getClass_ Class}
*
*
*
* @generated
*/
public class InClassImpl extends FromRangeImpl implements InClass {
/**
* The default value of the '{@link #getName() Name}' attribute.
*
*
* @see #getName()
* @generated
* @ordered
*/
protected static final String NAME_EDEFAULT = null;
/**
* The cached value of the '{@link #getName() Name}' attribute.
*
*
* @see #getName()
* @generated
* @ordered
*/
protected String name = NAME_EDEFAULT;
/**
* The default value of the '{@link #getClass_() Class}' attribute.
*
*
* @see #getClass_()
* @generated
* @ordered
*/
protected static final String CLASS_EDEFAULT = null;
/**
* The cached value of the '{@link #getClass_() Class}' attribute.
*
*
* @see #getClass_()
* @generated
* @ordered
*/
protected String class_ = CLASS_EDEFAULT;
/**
*
*
* @generated
*/
protected InClassImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return DomPackage.Literals.IN_CLASS;
}
/**
*
*
* @generated
*/
public String getName() {
return name;
}
/**
*
*
* @generated
*/
public void setName(String newName) {
String oldName = name;
name = newName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.IN_CLASS__NAME, oldName, name));
}
/**
*
*
* @generated
*/
public String getClass_() {
return class_;
}
/**
*
*
* @generated
*/
public void setClass(String newClass) {
String oldClass = class_;
class_ = newClass;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.IN_CLASS__CLASS, oldClass, class_));
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case DomPackage.IN_CLASS__NAME:
return getName();
case DomPackage.IN_CLASS__CLASS:
return getClass_();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case DomPackage.IN_CLASS__NAME:
setName((String)newValue);
return;
case DomPackage.IN_CLASS__CLASS:
setClass((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case DomPackage.IN_CLASS__NAME:
setName(NAME_EDEFAULT);
return;
case DomPackage.IN_CLASS__CLASS:
setClass(CLASS_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case DomPackage.IN_CLASS__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
case DomPackage.IN_CLASS__CLASS:
return CLASS_EDEFAULT == null ? class_ != null : !CLASS_EDEFAULT.equals(class_);
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (name: ");
result.append(name);
result.append(", class: ");
result.append(class_);
result.append(')');
return result.toString();
}
} //InClassImpl