org.openxma.dsl.dom.model.impl.StringLiteralValueImpl 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.StringLiteralValue;
/**
*
* An implementation of the model object 'String Literal Value'.
*
*
* The following features are implemented:
*
* - {@link org.openxma.dsl.dom.model.impl.StringLiteralValueImpl#getValue Value}
*
*
*
* @generated
*/
public class StringLiteralValueImpl extends LiteralValueImpl implements StringLiteralValue {
/**
* The default value of the '{@link #getValue() Value}' attribute.
*
*
* @see #getValue()
* @generated
* @ordered
*/
protected static final String VALUE_EDEFAULT = null;
/**
* The cached value of the '{@link #getValue() Value}' attribute.
*
*
* @see #getValue()
* @generated
* @ordered
*/
protected String value = VALUE_EDEFAULT;
/**
*
*
* @generated
*/
protected StringLiteralValueImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return DomPackage.Literals.STRING_LITERAL_VALUE;
}
/**
*
*
* @generated
*/
public String getValue() {
return value;
}
/**
*
*
* @generated
*/
public void setValue(String newValue) {
String oldValue = value;
value = newValue;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.STRING_LITERAL_VALUE__VALUE, oldValue, value));
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case DomPackage.STRING_LITERAL_VALUE__VALUE:
return getValue();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case DomPackage.STRING_LITERAL_VALUE__VALUE:
setValue((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case DomPackage.STRING_LITERAL_VALUE__VALUE:
setValue(VALUE_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case DomPackage.STRING_LITERAL_VALUE__VALUE:
return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (value: ");
result.append(value);
result.append(')');
return result.toString();
}
} //StringLiteralValueImpl