blob: e874421277e8c388b04841a2628370e0cec555e6 [file] [log] [blame]
/*
* Copyright (c) 2011 CEA 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:
* CEA - initial API and implementation
*
*/
package org.eclipse.uml2.uml.internal.operations;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.uml2.uml.Action;
import org.eclipse.uml2.uml.Behavior;
import org.eclipse.uml2.uml.Classifier;
import org.eclipse.uml2.uml.UMLPackage;
/**
* <!-- begin-user-doc -->
* A static utility class that provides operations related to '<em><b>Action</b></em>' model objects.
* <!-- end-user-doc -->
*
* <p>
* The following operations are supported:
* <ul>
* <li>{@link org.eclipse.uml2.uml.Action#getContext() <em>Get Context</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class ActionOperations
extends ActivityNodeOperations {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ActionOperations() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* Missing derivation for Action::/context : Classifier
* true
* @param action The receiving '<em><b>Action</b></em>' model object.
* <!-- end-model-doc -->
* @generated NOT
*/
public static Classifier getContext(Action action) {
return ((InternalEObject) action).eInternalContainer() instanceof Behavior
? (Classifier) ((Behavior) action.eContainer()).eGet(
UMLPackage.Literals.BEHAVIOR__CONTEXT, false)
: null;
}
} // ActionOperations