/**
* <copyright>
* </copyright>
*
* $Id$
*/
package OntoUML.impl;
import OntoUML.Feature;
import OntoUML.OntoUMLPackage;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Feature</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link OntoUML.impl.FeatureImpl#isIsStatic <em>Is Static</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class FeatureImpl extends RedefinableElementImpl implements Feature {
/**
* The default value of the '{@link #isIsStatic() <em>Is Static</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #isIsStatic()
* @generated
* @ordered
*/
protected static final boolean IS_STATIC_EDEFAULT = false;
/**
* The cached value of the '{@link #isIsStatic() <em>Is Static</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #isIsStatic()
* @generated
* @ordered
*/
protected boolean isStatic = IS_STATIC_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected FeatureImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return OntoUMLPackage.Literals.FEATURE;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean isIsStatic() {
return isStatic;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setIsStatic(boolean newIsStatic) {
boolean oldIsStatic = isStatic;
isStatic = newIsStatic;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, OntoUMLPackage.FEATURE__IS_STATIC, oldIsStatic, isStatic));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case OntoUMLPackage.FEATURE__IS_STATIC:
return isIsStatic() ? Boolean.TRUE : Boolean.FALSE;
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case OntoUMLPackage.FEATURE__IS_STATIC:
setIsStatic(((Boolean)newValue).booleanValue());
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case OntoUMLPackage.FEATURE__IS_STATIC:
setIsStatic(IS_STATIC_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case OntoUMLPackage.FEATURE__IS_STATIC:
return isStatic != IS_STATIC_EDEFAULT;
}
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(" (isStatic: ");
result.append(isStatic);
result.append(')');
return result.toString();
}
} //FeatureImpl