org.contextmapper.tactic.dsl.tacticdsl.impl.SimpleDomainObjectImpl Maven / Gradle / Ivy
/**
* generated by Xtext 2.20.0
*/
package org.contextmapper.tactic.dsl.tacticdsl.impl;
import org.contextmapper.tactic.dsl.tacticdsl.SimpleDomainObject;
import org.contextmapper.tactic.dsl.tacticdsl.TacticdslPackage;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
/**
*
* An implementation of the model object 'Simple Domain Object'.
*
*
* The following features are implemented:
*
*
* - {@link org.contextmapper.tactic.dsl.tacticdsl.impl.SimpleDomainObjectImpl#getDoc Doc}
* - {@link org.contextmapper.tactic.dsl.tacticdsl.impl.SimpleDomainObjectImpl#getName Name}
* - {@link org.contextmapper.tactic.dsl.tacticdsl.impl.SimpleDomainObjectImpl#getPackage Package}
* - {@link org.contextmapper.tactic.dsl.tacticdsl.impl.SimpleDomainObjectImpl#getHint Hint}
*
*
* @generated
*/
public class SimpleDomainObjectImpl extends MinimalEObjectImpl.Container implements SimpleDomainObject
{
/**
* The default value of the '{@link #getDoc() Doc}' attribute.
*
*
* @see #getDoc()
* @generated
* @ordered
*/
protected static final String DOC_EDEFAULT = null;
/**
* The cached value of the '{@link #getDoc() Doc}' attribute.
*
*
* @see #getDoc()
* @generated
* @ordered
*/
protected String doc = DOC_EDEFAULT;
/**
* 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 #getPackage() Package}' attribute.
*
*
* @see #getPackage()
* @generated
* @ordered
*/
protected static final String PACKAGE_EDEFAULT = null;
/**
* The cached value of the '{@link #getPackage() Package}' attribute.
*
*
* @see #getPackage()
* @generated
* @ordered
*/
protected String package_ = PACKAGE_EDEFAULT;
/**
* The default value of the '{@link #getHint() Hint}' attribute.
*
*
* @see #getHint()
* @generated
* @ordered
*/
protected static final String HINT_EDEFAULT = null;
/**
* The cached value of the '{@link #getHint() Hint}' attribute.
*
*
* @see #getHint()
* @generated
* @ordered
*/
protected String hint = HINT_EDEFAULT;
/**
*
*
* @generated
*/
protected SimpleDomainObjectImpl()
{
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass()
{
return TacticdslPackage.Literals.SIMPLE_DOMAIN_OBJECT;
}
/**
*
*
* @generated
*/
public String getDoc()
{
return doc;
}
/**
*
*
* @generated
*/
public void setDoc(String newDoc)
{
String oldDoc = doc;
doc = newDoc;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.SIMPLE_DOMAIN_OBJECT__DOC, oldDoc, doc));
}
/**
*
*
* @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, TacticdslPackage.SIMPLE_DOMAIN_OBJECT__NAME, oldName, name));
}
/**
*
*
* @generated
*/
public String getPackage()
{
return package_;
}
/**
*
*
* @generated
*/
public void setPackage(String newPackage)
{
String oldPackage = package_;
package_ = newPackage;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.SIMPLE_DOMAIN_OBJECT__PACKAGE, oldPackage, package_));
}
/**
*
*
* @generated
*/
public String getHint()
{
return hint;
}
/**
*
*
* @generated
*/
public void setHint(String newHint)
{
String oldHint = hint;
hint = newHint;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.SIMPLE_DOMAIN_OBJECT__HINT, oldHint, hint));
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType)
{
switch (featureID)
{
case TacticdslPackage.SIMPLE_DOMAIN_OBJECT__DOC:
return getDoc();
case TacticdslPackage.SIMPLE_DOMAIN_OBJECT__NAME:
return getName();
case TacticdslPackage.SIMPLE_DOMAIN_OBJECT__PACKAGE:
return getPackage();
case TacticdslPackage.SIMPLE_DOMAIN_OBJECT__HINT:
return getHint();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue)
{
switch (featureID)
{
case TacticdslPackage.SIMPLE_DOMAIN_OBJECT__DOC:
setDoc((String)newValue);
return;
case TacticdslPackage.SIMPLE_DOMAIN_OBJECT__NAME:
setName((String)newValue);
return;
case TacticdslPackage.SIMPLE_DOMAIN_OBJECT__PACKAGE:
setPackage((String)newValue);
return;
case TacticdslPackage.SIMPLE_DOMAIN_OBJECT__HINT:
setHint((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID)
{
switch (featureID)
{
case TacticdslPackage.SIMPLE_DOMAIN_OBJECT__DOC:
setDoc(DOC_EDEFAULT);
return;
case TacticdslPackage.SIMPLE_DOMAIN_OBJECT__NAME:
setName(NAME_EDEFAULT);
return;
case TacticdslPackage.SIMPLE_DOMAIN_OBJECT__PACKAGE:
setPackage(PACKAGE_EDEFAULT);
return;
case TacticdslPackage.SIMPLE_DOMAIN_OBJECT__HINT:
setHint(HINT_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID)
{
switch (featureID)
{
case TacticdslPackage.SIMPLE_DOMAIN_OBJECT__DOC:
return DOC_EDEFAULT == null ? doc != null : !DOC_EDEFAULT.equals(doc);
case TacticdslPackage.SIMPLE_DOMAIN_OBJECT__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
case TacticdslPackage.SIMPLE_DOMAIN_OBJECT__PACKAGE:
return PACKAGE_EDEFAULT == null ? package_ != null : !PACKAGE_EDEFAULT.equals(package_);
case TacticdslPackage.SIMPLE_DOMAIN_OBJECT__HINT:
return HINT_EDEFAULT == null ? hint != null : !HINT_EDEFAULT.equals(hint);
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
@Override
public String toString()
{
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (doc: ");
result.append(doc);
result.append(", name: ");
result.append(name);
result.append(", package: ");
result.append(package_);
result.append(", hint: ");
result.append(hint);
result.append(')');
return result.toString();
}
} //SimpleDomainObjectImpl