/** */ package de.gebit.integrity.dsl.impl; import de.gebit.integrity.dsl.DslPackage; import de.gebit.integrity.dsl.JavaClassReference; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; import org.eclipse.xtext.common.types.JvmType; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Java Class Reference</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * </p> * <ul> * <li>{@link de.gebit.integrity.dsl.impl.JavaClassReferenceImpl#getType <em>Type</em>}</li> * </ul> * * @generated */ public class JavaClassReferenceImpl extends MinimalEObjectImpl.Container implements JavaClassReference { /** * The cached value of the '{@link #getType() <em>Type</em>}' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getType() * @generated * @ordered */ protected JvmType type; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected JavaClassReferenceImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return DslPackage.Literals.JAVA_CLASS_REFERENCE; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public JvmType getType() { if (type != null && type.eIsProxy()) { InternalEObject oldType = (InternalEObject)type; type = (JvmType)eResolveProxy(oldType); if (type != oldType) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, DslPackage.JAVA_CLASS_REFERENCE__TYPE, oldType, type)); } } return type; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public JvmType basicGetType() { return type; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setType(JvmType newType) { JvmType oldType = type; type = newType; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DslPackage.JAVA_CLASS_REFERENCE__TYPE, oldType, type)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case DslPackage.JAVA_CLASS_REFERENCE__TYPE: if (resolve) return getType(); return basicGetType(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case DslPackage.JAVA_CLASS_REFERENCE__TYPE: setType((JvmType)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case DslPackage.JAVA_CLASS_REFERENCE__TYPE: setType((JvmType)null); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case DslPackage.JAVA_CLASS_REFERENCE__TYPE: return type != null; } return super.eIsSet(featureID); } } //JavaClassReferenceImpl