/** * <copyright> * </copyright> * * $Id$ */ package net.sf.etl.samples.ej.ast.impl; import java.util.Collection; import net.sf.etl.samples.ej.ast.AstPackage; import net.sf.etl.samples.ej.ast.ClassBlock; import net.sf.etl.samples.ej.ast.ClassifierMemberStatement; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.util.EObjectContainmentEList; import org.eclipse.emf.ecore.util.InternalEList; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Class Block</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link net.sf.etl.samples.ej.ast.impl.ClassBlockImpl#getContent <em>Content</em>}</li> * </ul> * </p> * * @generated */ public class ClassBlockImpl extends EJBaseImpl implements ClassBlock { /** * The cached value of the '{@link #getContent() <em>Content</em>}' containment reference list. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getContent() * @generated * @ordered */ protected EList content = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected ClassBlockImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected EClass eStaticClass() { return AstPackage.Literals.CLASS_BLOCK; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EList getContent() { if (content == null) { content = new EObjectContainmentEList(ClassifierMemberStatement.class, this, AstPackage.CLASS_BLOCK__CONTENT); } return content; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case AstPackage.CLASS_BLOCK__CONTENT: return ((InternalEList)getContent()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case AstPackage.CLASS_BLOCK__CONTENT: return getContent(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void eSet(int featureID, Object newValue) { switch (featureID) { case AstPackage.CLASS_BLOCK__CONTENT: getContent().clear(); getContent().addAll((Collection)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void eUnset(int featureID) { switch (featureID) { case AstPackage.CLASS_BLOCK__CONTENT: getContent().clear(); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public boolean eIsSet(int featureID) { switch (featureID) { case AstPackage.CLASS_BLOCK__CONTENT: return content != null && !content.isEmpty(); } return super.eIsSet(featureID); } } //ClassBlockImpl