org.openxma.dsl.ddl.ddlDsl.impl.RawImpl Maven / Gradle / Ivy
/**
*
*
*
*/
package org.openxma.dsl.ddl.ddlDsl.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.ddl.ddlDsl.DdlDslPackage;
import org.openxma.dsl.ddl.ddlDsl.Raw;
/**
*
* An implementation of the model object 'Raw'.
*
*
* The following features are implemented:
*
* - {@link org.openxma.dsl.ddl.ddlDsl.impl.RawImpl#getSize Size}
*
*
*
* @generated
*/
public class RawImpl extends LongRawImpl implements Raw
{
/**
* The default value of the '{@link #getSize() Size}' attribute.
*
*
* @see #getSize()
* @generated
* @ordered
*/
protected static final int SIZE_EDEFAULT = 0;
/**
* The cached value of the '{@link #getSize() Size}' attribute.
*
*
* @see #getSize()
* @generated
* @ordered
*/
protected int size = SIZE_EDEFAULT;
/**
*
*
* @generated
*/
protected RawImpl()
{
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass()
{
return DdlDslPackage.Literals.RAW;
}
/**
*
*
* @generated
*/
public int getSize()
{
return size;
}
/**
*
*
* @generated
*/
public void setSize(int newSize)
{
int oldSize = size;
size = newSize;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, DdlDslPackage.RAW__SIZE, oldSize, size));
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType)
{
switch (featureID) {
case DdlDslPackage.RAW__SIZE:
return getSize();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue)
{
switch (featureID) {
case DdlDslPackage.RAW__SIZE:
setSize((Integer)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID)
{
switch (featureID) {
case DdlDslPackage.RAW__SIZE:
setSize(SIZE_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID)
{
switch (featureID) {
case DdlDslPackage.RAW__SIZE:
return size != SIZE_EDEFAULT;
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
@Override
public String toString()
{
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (size: ");
result.append(size);
result.append(')');
return result.toString();
}
} //RawImpl