blob: f3a70cdfe8198fcfb47074367733d1a8a5dcee7e [file] [log] [blame]
/*
* Copyright (c) 2003, 2005 IBM Corporation 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:
* IBM - initial API and implementation
*
* $Id: ExecutionEnvironmentImpl.java,v 1.25 2005/11/04 22:23:01 khussey Exp $
*/
package org.eclipse.uml2.impl;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.util.InternalEList;
import org.eclipse.uml2.ExecutionEnvironment;
import org.eclipse.uml2.UML2Package;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Execution Environment</b></em>'.
* <!-- end-user-doc -->
* <p>
* </p>
*
* @generated
*/
public class ExecutionEnvironmentImpl extends NodeImpl implements ExecutionEnvironment {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final String copyright = "Copyright (c) IBM Corporation and others."; //$NON-NLS-1$
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ExecutionEnvironmentImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected EClass eStaticClass() {
return UML2Package.eINSTANCE.getExecutionEnvironment();
}
public NotificationChain eDynamicInverseAdd(InternalEObject otherEnd, int featureID, Class inverseClass, NotificationChain msgs) {
switch (eDerivedStructuralFeatureID(featureID, inverseClass)) {
case UML2Package.EXECUTION_ENVIRONMENT__OWNED_STATE_MACHINE:
return ((InternalEList)getOwnedStateMachines()).basicAdd(otherEnd, msgs);
default :
return super.eDynamicInverseAdd(otherEnd, featureID, inverseClass, msgs);
}
}
public boolean eIsSet(EStructuralFeature eFeature) {
switch (eDerivedStructuralFeatureID(eFeature)) {
case UML2Package.EXECUTION_ENVIRONMENT__VISIBILITY:
return false;
case UML2Package.EXECUTION_ENVIRONMENT__OWNED_BEHAVIOR:
return ownedBehavior != null && !ownedBehavior.isEmpty();
case UML2Package.EXECUTION_ENVIRONMENT__NESTED_CLASSIFIER:
return false;
case UML2Package.EXECUTION_ENVIRONMENT__OWNED_ATTRIBUTE:
return ownedAttribute != null && !ownedAttribute.isEmpty();
}
return eIsSetGen(eFeature);
}
} //ExecutionEnvironmentImpl