/** */ package de.gebit.integrity.dsl.impl; import de.gebit.integrity.dsl.DslPackage; import de.gebit.integrity.dsl.FixedParameterName; 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.xtext.common.types.JvmAnnotationReference; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Fixed Parameter Name</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * </p> * <ul> * <li>{@link de.gebit.integrity.dsl.impl.FixedParameterNameImpl#getAnnotation <em>Annotation</em>}</li> * </ul> * * @generated */ public class FixedParameterNameImpl extends ParameterNameImpl implements FixedParameterName { /** * The cached value of the '{@link #getAnnotation() <em>Annotation</em>}' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getAnnotation() * @generated * @ordered */ protected JvmAnnotationReference annotation; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected FixedParameterNameImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return DslPackage.Literals.FIXED_PARAMETER_NAME; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public JvmAnnotationReference getAnnotation() { if (annotation != null && annotation.eIsProxy()) { InternalEObject oldAnnotation = (InternalEObject)annotation; annotation = (JvmAnnotationReference)eResolveProxy(oldAnnotation); if (annotation != oldAnnotation) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, DslPackage.FIXED_PARAMETER_NAME__ANNOTATION, oldAnnotation, annotation)); } } return annotation; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public JvmAnnotationReference basicGetAnnotation() { return annotation; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setAnnotation(JvmAnnotationReference newAnnotation) { JvmAnnotationReference oldAnnotation = annotation; annotation = newAnnotation; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DslPackage.FIXED_PARAMETER_NAME__ANNOTATION, oldAnnotation, annotation)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case DslPackage.FIXED_PARAMETER_NAME__ANNOTATION: if (resolve) return getAnnotation(); return basicGetAnnotation(); } 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.FIXED_PARAMETER_NAME__ANNOTATION: setAnnotation((JvmAnnotationReference)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case DslPackage.FIXED_PARAMETER_NAME__ANNOTATION: setAnnotation((JvmAnnotationReference)null); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case DslPackage.FIXED_PARAMETER_NAME__ANNOTATION: return annotation != null; } return super.eIsSet(featureID); } } //FixedParameterNameImpl