All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.ocl.cst.impl.OCLDocumentCSImpl Maven / Gradle / Ivy

/**
 * 
 *
 * Copyright (c) 2008 Zeligsoft Inc. and others.
 * All rights reserved.   This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *   Zeligsoft - Initial API and implementation
 *
 * 
 *
 * $Id: OCLDocumentCSImpl.java,v 1.2 2009/10/15 19:38:06 ewillink Exp $
 */
package org.eclipse.ocl.cst.impl;

import java.util.Collection;

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;
import org.eclipse.ocl.cst.CSTPackage;
import org.eclipse.ocl.cst.OCLDocumentCS;
import org.eclipse.ocl.cst.PackageDeclarationCS;

/**
 * 
 * An implementation of the model object 'OCL Document CS'.
 * @since 1.3
 * 
 * 

* The following features are implemented: *

    *
  • {@link org.eclipse.ocl.cst.impl.OCLDocumentCSImpl#getPackageDeclarations Package Declarations}
  • *
*

* * @generated */ public class OCLDocumentCSImpl extends CSTNodeImpl implements OCLDocumentCS { /** * The cached value of the '{@link #getPackageDeclarations() Package Declarations}' containment reference list. * * * @see #getPackageDeclarations() * @generated * @ordered */ protected EList packageDeclarations; /** * * * @generated */ protected OCLDocumentCSImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return CSTPackage.Literals.OCL_DOCUMENT_CS; } /** * * * @generated */ public EList getPackageDeclarations() { if (packageDeclarations == null) { packageDeclarations = new EObjectContainmentEList( PackageDeclarationCS.class, this, CSTPackage.OCL_DOCUMENT_CS__PACKAGE_DECLARATIONS); } return packageDeclarations; } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case CSTPackage.OCL_DOCUMENT_CS__PACKAGE_DECLARATIONS : return ((InternalEList) getPackageDeclarations()) .basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case CSTPackage.OCL_DOCUMENT_CS__PACKAGE_DECLARATIONS : return getPackageDeclarations(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case CSTPackage.OCL_DOCUMENT_CS__PACKAGE_DECLARATIONS : getPackageDeclarations().clear(); getPackageDeclarations().addAll( (Collection) newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case CSTPackage.OCL_DOCUMENT_CS__PACKAGE_DECLARATIONS : getPackageDeclarations().clear(); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case CSTPackage.OCL_DOCUMENT_CS__PACKAGE_DECLARATIONS : return packageDeclarations != null && !packageDeclarations.isEmpty(); } return super.eIsSet(featureID); } } //OCLDocumentCSImpl




© 2015 - 2024 Weber Informatics LLC | Privacy Policy