/** * * * * $Id: ChainExpressionNodeImpl.java,v 1.3 2008/03/13 08:40:01 jkohnlein Exp $ */ package org.eclipse.xpand3.internal.parser.xpand3node.impl; import java.util.Collection; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.util.EObjectResolvingEList; import org.eclipse.tmf.common.node.CompositeNode; import org.eclipse.tmf.common.node.impl.CompositeNodeImpl; import org.eclipse.xpand3.internal.parser.xpand3node.ChainExpressionNode; import org.eclipse.xpand3.internal.parser.xpand3node.Xpand3nodePackage; /** * * An implementation of the model object 'Chain Expression Node'. * *

* The following features are implemented: *

*

* * @generated */ public class ChainExpressionNodeImpl extends CompositeNodeImpl implements ChainExpressionNode { /** * The cached value of the '{@link #getNexts() Nexts}' reference list. * * * @see #getNexts() * @generated * @ordered */ protected EList nexts; /** * The cached value of the '{@link #getFirst() First}' reference. * * * @see #getFirst() * @generated * @ordered */ protected CompositeNode first; /** * * * @generated */ protected ChainExpressionNodeImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return Xpand3nodePackage.Literals.CHAIN_EXPRESSION_NODE; } /** * * * @generated */ public EList getNexts() { if (nexts == null) { nexts = new EObjectResolvingEList(CompositeNode.class, this, Xpand3nodePackage.CHAIN_EXPRESSION_NODE__NEXTS); } return nexts; } /** * * * @generated */ public CompositeNode getFirst() { if (first != null && first.eIsProxy()) { InternalEObject oldFirst = (InternalEObject)first; first = (CompositeNode)eResolveProxy(oldFirst); if (first != oldFirst) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, Xpand3nodePackage.CHAIN_EXPRESSION_NODE__FIRST, oldFirst, first)); } } return first; } /** * * * @generated */ public CompositeNode basicGetFirst() { return first; } /** * * * @generated */ public void setFirst(CompositeNode newFirst) { CompositeNode oldFirst = first; first = newFirst; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, Xpand3nodePackage.CHAIN_EXPRESSION_NODE__FIRST, oldFirst, first)); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case Xpand3nodePackage.CHAIN_EXPRESSION_NODE__NEXTS: return getNexts(); case Xpand3nodePackage.CHAIN_EXPRESSION_NODE__FIRST: if (resolve) return getFirst(); return basicGetFirst(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case Xpand3nodePackage.CHAIN_EXPRESSION_NODE__NEXTS: getNexts().clear(); getNexts().addAll((Collection)newValue); return; case Xpand3nodePackage.CHAIN_EXPRESSION_NODE__FIRST: setFirst((CompositeNode)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case Xpand3nodePackage.CHAIN_EXPRESSION_NODE__NEXTS: getNexts().clear(); return; case Xpand3nodePackage.CHAIN_EXPRESSION_NODE__FIRST: setFirst((CompositeNode)null); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case Xpand3nodePackage.CHAIN_EXPRESSION_NODE__NEXTS: return nexts != null && !nexts.isEmpty(); case Xpand3nodePackage.CHAIN_EXPRESSION_NODE__FIRST: return first != null; } return super.eIsSet(featureID); } } //ChainExpressionNodeImpl