/** */ package hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.impl; import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Assertion; import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguagePackage; import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.AssertionAnnotation; import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicproblemPackage; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; /** * * An implementation of the model object 'Assertion Annotation'. * *

* The following features are implemented: *

* * * @generated */ public class AssertionAnnotationImpl extends AnnotationImpl implements AssertionAnnotation { /** * The cached value of the '{@link #getTarget() Target}' reference. * * * @see #getTarget() * @generated * @ordered */ protected Assertion target; /** * * * @generated */ protected AssertionAnnotationImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return LogicproblemPackage.Literals.ASSERTION_ANNOTATION; } /** * * * @generated */ @Override public Assertion getTarget() { if (target != null && target.eIsProxy()) { InternalEObject oldTarget = (InternalEObject)target; target = (Assertion)eResolveProxy(oldTarget); if (target != oldTarget) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, LogicproblemPackage.ASSERTION_ANNOTATION__TARGET, oldTarget, target)); } } return target; } /** * * * @generated */ public Assertion basicGetTarget() { return target; } /** * * * @generated */ public NotificationChain basicSetTarget(Assertion newTarget, NotificationChain msgs) { Assertion oldTarget = target; target = newTarget; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, LogicproblemPackage.ASSERTION_ANNOTATION__TARGET, oldTarget, newTarget); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ @Override public void setTarget(Assertion newTarget) { if (newTarget != target) { NotificationChain msgs = null; if (target != null) msgs = ((InternalEObject)target).eInverseRemove(this, LogiclanguagePackage.ASSERTION__ANNOTATIONS, Assertion.class, msgs); if (newTarget != null) msgs = ((InternalEObject)newTarget).eInverseAdd(this, LogiclanguagePackage.ASSERTION__ANNOTATIONS, Assertion.class, msgs); msgs = basicSetTarget(newTarget, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, LogicproblemPackage.ASSERTION_ANNOTATION__TARGET, newTarget, newTarget)); } /** * * * @generated */ @Override public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case LogicproblemPackage.ASSERTION_ANNOTATION__TARGET: if (target != null) msgs = ((InternalEObject)target).eInverseRemove(this, LogiclanguagePackage.ASSERTION__ANNOTATIONS, Assertion.class, msgs); return basicSetTarget((Assertion)otherEnd, msgs); } return super.eInverseAdd(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case LogicproblemPackage.ASSERTION_ANNOTATION__TARGET: return basicSetTarget(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case LogicproblemPackage.ASSERTION_ANNOTATION__TARGET: if (resolve) return getTarget(); return basicGetTarget(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case LogicproblemPackage.ASSERTION_ANNOTATION__TARGET: setTarget((Assertion)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case LogicproblemPackage.ASSERTION_ANNOTATION__TARGET: setTarget((Assertion)null); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case LogicproblemPackage.ASSERTION_ANNOTATION__TARGET: return target != null; } return super.eIsSet(featureID); } } //AssertionAnnotationImpl