| /* |
| * Copyright (c) 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: OperationImpl.java,v 1.2 2005/11/16 19:03:04 khussey Exp $ |
| */ |
| package org.eclipse.uml2.uml.internal.impl; |
| |
| import java.util.Collection; |
| import java.util.Iterator; |
| import java.util.List; |
| import java.util.Map; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| import org.eclipse.emf.common.notify.NotificationChain; |
| |
| import org.eclipse.emf.common.util.DiagnosticChain; |
| |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.EObject; |
| import org.eclipse.emf.ecore.EStructuralFeature; |
| import org.eclipse.emf.ecore.InternalEObject; |
| |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| |
| import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; |
| import org.eclipse.emf.ecore.util.EObjectResolvingEList; |
| import org.eclipse.emf.ecore.util.EcoreUtil; |
| import org.eclipse.emf.ecore.util.InternalEList; |
| |
| import org.eclipse.uml2.common.util.CacheAdapter; |
| import org.eclipse.uml2.common.util.DerivedUnionEObjectEList; |
| import org.eclipse.uml2.common.util.SubsetEObjectEList; |
| import org.eclipse.uml2.common.util.SupersetEObjectContainmentWithInverseEList; |
| |
| import org.eclipse.uml2.uml.CallConcurrencyKind; |
| import org.eclipse.uml2.uml.Classifier; |
| import org.eclipse.uml2.uml.Constraint; |
| import org.eclipse.uml2.uml.DataType; |
| import org.eclipse.uml2.uml.Element; |
| import org.eclipse.uml2.uml.Interface; |
| import org.eclipse.uml2.uml.Namespace; |
| import org.eclipse.uml2.uml.Operation; |
| import org.eclipse.uml2.uml.OperationTemplateParameter; |
| import org.eclipse.uml2.uml.Parameter; |
| import org.eclipse.uml2.uml.ParameterableElement; |
| import org.eclipse.uml2.uml.RedefinableElement; |
| import org.eclipse.uml2.uml.StringExpression; |
| import org.eclipse.uml2.uml.TemplateBinding; |
| import org.eclipse.uml2.uml.TemplateParameter; |
| import org.eclipse.uml2.uml.TemplateSignature; |
| import org.eclipse.uml2.uml.TemplateableElement; |
| import org.eclipse.uml2.uml.Type; |
| import org.eclipse.uml2.uml.UMLFactory; |
| import org.eclipse.uml2.uml.UMLPackage; |
| import org.eclipse.uml2.uml.VisibilityKind; |
| |
| import org.eclipse.uml2.uml.internal.operations.OperationOperations; |
| import org.eclipse.uml2.uml.internal.operations.ParameterableElementOperations; |
| import org.eclipse.uml2.uml.internal.operations.TemplateableElementOperations; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Operation</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * <ul> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.OperationImpl#getTemplateParameter <em>Template Parameter</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.OperationImpl#getOwningTemplateParameter <em>Owning Template Parameter</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.OperationImpl#getOwnedElements <em>Owned Element</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.OperationImpl#getTemplateBindings <em>Template Binding</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.OperationImpl#getOwnedTemplateSignature <em>Owned Template Signature</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.OperationImpl#getRedefinitionContexts <em>Redefinition Context</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.OperationImpl#getFeaturingClassifiers <em>Featuring Classifier</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.OperationImpl#getRedefinedElements <em>Redefined Element</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.OperationImpl#getOwnedRules <em>Owned Rule</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.OperationImpl#isQuery <em>Is Query</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.OperationImpl#isOrdered <em>Is Ordered</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.OperationImpl#isUnique <em>Is Unique</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.OperationImpl#getLower <em>Lower</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.OperationImpl#getUpper <em>Upper</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.OperationImpl#getClass_ <em>Class </em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.OperationImpl#getPreconditions <em>Precondition</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.OperationImpl#getPostconditions <em>Postcondition</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.OperationImpl#getRedefinedOperations <em>Redefined Operation</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.OperationImpl#getDatatype <em>Datatype</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.OperationImpl#getBodyCondition <em>Body Condition</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.OperationImpl#getType <em>Type</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.OperationImpl#getInterface <em>Interface</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.OperationImpl#getOwnedParameters <em>Owned Parameter</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.OperationImpl#getRaisedExceptions <em>Raised Exception</em>}</li> |
| * </ul> |
| * </p> |
| * |
| * @generated |
| */ |
| public class OperationImpl |
| extends BehavioralFeatureImpl |
| implements Operation { |
| |
| /** |
| * A bit field representing the indices of non-primitive feature values. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected int eVirtualIndexBits1 = 0; |
| |
| /** |
| * The default value of the '{@link #isQuery() <em>Is Query</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isQuery() |
| * @generated |
| * @ordered |
| */ |
| protected static final boolean IS_QUERY_EDEFAULT = false; |
| |
| /** |
| * The flag representing the value of the '{@link #isQuery() <em>Is Query</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isQuery() |
| * @generated |
| * @ordered |
| */ |
| protected static final int IS_QUERY_EFLAG = 1 << 11; |
| |
| /** |
| * The default value of the '{@link #isOrdered() <em>Is Ordered</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isOrdered() |
| * @generated |
| * @ordered |
| */ |
| protected static final boolean IS_ORDERED_EDEFAULT = false; |
| |
| /** |
| * The default value of the '{@link #isUnique() <em>Is Unique</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isUnique() |
| * @generated |
| * @ordered |
| */ |
| protected static final boolean IS_UNIQUE_EDEFAULT = true; |
| |
| /** |
| * The default value of the '{@link #getLower() <em>Lower</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getLower() |
| * @generated |
| * @ordered |
| */ |
| protected static final int LOWER_EDEFAULT = 1; |
| |
| /** |
| * The default value of the '{@link #getUpper() <em>Upper</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getUpper() |
| * @generated |
| * @ordered |
| */ |
| protected static final int UPPER_EDEFAULT = 1; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected OperationImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected EClass eStaticClass() { |
| return UMLPackage.eINSTANCE.getOperation(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public TemplateParameter getTemplateParameter() { |
| TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.OPERATION__TEMPLATE_PARAMETER); |
| if (templateParameter != null && templateParameter.eIsProxy()) { |
| TemplateParameter oldTemplateParameter = templateParameter; |
| templateParameter = (TemplateParameter) eResolveProxy((InternalEObject) templateParameter); |
| if (templateParameter != oldTemplateParameter) { |
| eVirtualSet(UMLPackage.OPERATION__TEMPLATE_PARAMETER, |
| templateParameter); |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, |
| UMLPackage.OPERATION__TEMPLATE_PARAMETER, |
| oldTemplateParameter, templateParameter)); |
| } |
| } |
| return templateParameter; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public TemplateParameter basicGetTemplateParameter() { |
| return (TemplateParameter) eVirtualGet(UMLPackage.OPERATION__TEMPLATE_PARAMETER); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetTemplateParameter( |
| TemplateParameter newTemplateParameter, NotificationChain msgs) { |
| Object oldTemplateParameter = eVirtualSet( |
| UMLPackage.OPERATION__TEMPLATE_PARAMETER, newTemplateParameter); |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, |
| Notification.SET, UMLPackage.OPERATION__TEMPLATE_PARAMETER, |
| oldTemplateParameter == EVIRTUAL_NO_VALUE |
| ? null |
| : oldTemplateParameter, newTemplateParameter); |
| if (msgs == null) |
| msgs = notification; |
| else |
| msgs.add(notification); |
| } |
| |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setTemplateParameter(TemplateParameter newTemplateParameter) { |
| TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.OPERATION__TEMPLATE_PARAMETER); |
| if (newTemplateParameter != templateParameter) { |
| NotificationChain msgs = null; |
| if (templateParameter != null) |
| msgs = ((InternalEObject) templateParameter) |
| .eInverseRemove( |
| this, |
| UMLPackage.OPERATION_TEMPLATE_PARAMETER__PARAMETERED_ELEMENT, |
| OperationTemplateParameter.class, msgs); |
| if (newTemplateParameter != null) |
| msgs = ((InternalEObject) newTemplateParameter) |
| .eInverseAdd( |
| this, |
| UMLPackage.OPERATION_TEMPLATE_PARAMETER__PARAMETERED_ELEMENT, |
| OperationTemplateParameter.class, msgs); |
| msgs = basicSetTemplateParameter(newTemplateParameter, msgs); |
| if (msgs != null) |
| msgs.dispatch(); |
| } else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, |
| UMLPackage.OPERATION__TEMPLATE_PARAMETER, newTemplateParameter, |
| newTemplateParameter)); |
| |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isSetTemplateParameter() { |
| return eVirtualGet(UMLPackage.OPERATION__TEMPLATE_PARAMETER) != null; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public TemplateParameter getOwningTemplateParameter() { |
| if (eContainerFeatureID != UMLPackage.OPERATION__OWNING_TEMPLATE_PARAMETER) |
| return null; |
| return (TemplateParameter) eContainer; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setOwningTemplateParameter( |
| TemplateParameter newOwningTemplateParameter) { |
| EObject oldOwningTemplateParameter = eContainer; |
| if (newOwningTemplateParameter != eContainer |
| || (eContainerFeatureID != UMLPackage.OPERATION__OWNING_TEMPLATE_PARAMETER && newOwningTemplateParameter != null)) { |
| if (EcoreUtil |
| .isAncestor(this, (EObject) newOwningTemplateParameter)) |
| throw new IllegalArgumentException( |
| "Recursive containment not allowed for " + toString()); //$NON-NLS-1$ |
| NotificationChain msgs = null; |
| if (eContainer != null) |
| msgs = eBasicRemoveFromContainer(msgs); |
| if (newOwningTemplateParameter != null) |
| msgs = ((InternalEObject) newOwningTemplateParameter) |
| .eInverseAdd( |
| this, |
| UMLPackage.TEMPLATE_PARAMETER__OWNED_PARAMETERED_ELEMENT, |
| TemplateParameter.class, msgs); |
| msgs = eBasicSetContainer( |
| (InternalEObject) newOwningTemplateParameter, |
| UMLPackage.OPERATION__OWNING_TEMPLATE_PARAMETER, msgs); |
| if (msgs != null) |
| msgs.dispatch(); |
| } else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, |
| UMLPackage.OPERATION__OWNING_TEMPLATE_PARAMETER, |
| newOwningTemplateParameter, newOwningTemplateParameter)); |
| |
| if (newOwningTemplateParameter != null |
| || oldOwningTemplateParameter == eVirtualGet(UMLPackage.OPERATION__TEMPLATE_PARAMETER)) { |
| setTemplateParameter(newOwningTemplateParameter); |
| } |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public List getOwnedElements() { |
| List ownedElement = (List) eVirtualGet(UMLPackage.OPERATION__OWNED_ELEMENT); |
| if (ownedElement == null) { |
| eVirtualSet(UMLPackage.OPERATION__OWNED_ELEMENT, |
| ownedElement = new DerivedUnionEObjectEList(Element.class, |
| this, UMLPackage.OPERATION__OWNED_ELEMENT, |
| new EStructuralFeature[]{ |
| UMLPackage.eINSTANCE.getElement_OwnedComment(), |
| UMLPackage.eINSTANCE.getNamedElement_NameExpression(), |
| UMLPackage.eINSTANCE.getNamespace_ElementImport(), |
| UMLPackage.eINSTANCE.getNamespace_PackageImport(), |
| UMLPackage.eINSTANCE.getNamespace_OwnedMember(), |
| UMLPackage.eINSTANCE |
| .getTemplateableElement_TemplateBinding(), |
| UMLPackage.eINSTANCE |
| .getTemplateableElement_OwnedTemplateSignature()})); |
| } |
| return ownedElement; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public List getTemplateBindings() { |
| List templateBinding = (List) eVirtualGet(UMLPackage.OPERATION__TEMPLATE_BINDING); |
| if (templateBinding == null) { |
| eVirtualSet(UMLPackage.OPERATION__TEMPLATE_BINDING, |
| templateBinding = new EObjectContainmentWithInverseEList( |
| TemplateBinding.class, this, |
| UMLPackage.OPERATION__TEMPLATE_BINDING, |
| UMLPackage.TEMPLATE_BINDING__BOUND_ELEMENT)); |
| } |
| return templateBinding; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public TemplateBinding createTemplateBinding() { |
| TemplateBinding newTemplateBinding = UMLFactory.eINSTANCE |
| .createTemplateBinding(); |
| getTemplateBindings().add(newTemplateBinding); |
| return newTemplateBinding; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public TemplateSignature getOwnedTemplateSignature() { |
| TemplateSignature ownedTemplateSignature = (TemplateSignature) eVirtualGet(UMLPackage.OPERATION__OWNED_TEMPLATE_SIGNATURE); |
| return ownedTemplateSignature; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetOwnedTemplateSignature( |
| TemplateSignature newOwnedTemplateSignature, NotificationChain msgs) { |
| Object oldOwnedTemplateSignature = eVirtualSet( |
| UMLPackage.OPERATION__OWNED_TEMPLATE_SIGNATURE, |
| newOwnedTemplateSignature); |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, |
| Notification.SET, |
| UMLPackage.OPERATION__OWNED_TEMPLATE_SIGNATURE, |
| oldOwnedTemplateSignature == EVIRTUAL_NO_VALUE |
| ? null |
| : oldOwnedTemplateSignature, newOwnedTemplateSignature); |
| if (msgs == null) |
| msgs = notification; |
| else |
| msgs.add(notification); |
| } |
| |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setOwnedTemplateSignature( |
| TemplateSignature newOwnedTemplateSignature) { |
| TemplateSignature ownedTemplateSignature = (TemplateSignature) eVirtualGet(UMLPackage.OPERATION__OWNED_TEMPLATE_SIGNATURE); |
| if (newOwnedTemplateSignature != ownedTemplateSignature) { |
| NotificationChain msgs = null; |
| if (ownedTemplateSignature != null) |
| msgs = ((InternalEObject) ownedTemplateSignature) |
| .eInverseRemove(this, |
| UMLPackage.TEMPLATE_SIGNATURE__TEMPLATE, |
| TemplateSignature.class, msgs); |
| if (newOwnedTemplateSignature != null) |
| msgs = ((InternalEObject) newOwnedTemplateSignature) |
| .eInverseAdd(this, UMLPackage.TEMPLATE_SIGNATURE__TEMPLATE, |
| TemplateSignature.class, msgs); |
| msgs = basicSetOwnedTemplateSignature(newOwnedTemplateSignature, |
| msgs); |
| if (msgs != null) |
| msgs.dispatch(); |
| } else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, |
| UMLPackage.OPERATION__OWNED_TEMPLATE_SIGNATURE, |
| newOwnedTemplateSignature, newOwnedTemplateSignature)); |
| |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public TemplateSignature createOwnedTemplateSignature(EClass eClass) { |
| TemplateSignature newOwnedTemplateSignature = (TemplateSignature) eClass |
| .getEPackage().getEFactoryInstance().create(eClass); |
| setOwnedTemplateSignature(newOwnedTemplateSignature); |
| return newOwnedTemplateSignature; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public TemplateSignature createOwnedTemplateSignature() { |
| TemplateSignature newOwnedTemplateSignature = UMLFactory.eINSTANCE |
| .createTemplateSignature(); |
| setOwnedTemplateSignature(newOwnedTemplateSignature); |
| return newOwnedTemplateSignature; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public List getRedefinitionContexts() { |
| List redefinitionContext = (List) eVirtualGet(UMLPackage.OPERATION__REDEFINITION_CONTEXT); |
| if (redefinitionContext == null) { |
| eVirtualSet(UMLPackage.OPERATION__REDEFINITION_CONTEXT, |
| redefinitionContext = new DerivedUnionEObjectEList( |
| Classifier.class, this, |
| UMLPackage.OPERATION__REDEFINITION_CONTEXT, |
| new EStructuralFeature[]{ |
| UMLPackage.eINSTANCE.getOperation_Class_(), |
| UMLPackage.eINSTANCE.getOperation_Datatype(), |
| UMLPackage.eINSTANCE.getOperation_Interface()})); |
| } |
| return redefinitionContext; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public List getFeaturingClassifiers() { |
| List featuringClassifier = (List) eVirtualGet(UMLPackage.OPERATION__FEATURING_CLASSIFIER); |
| if (featuringClassifier == null) { |
| eVirtualSet(UMLPackage.OPERATION__FEATURING_CLASSIFIER, |
| featuringClassifier = new DerivedUnionEObjectEList( |
| Classifier.class, this, |
| UMLPackage.OPERATION__FEATURING_CLASSIFIER, |
| new EStructuralFeature[]{ |
| UMLPackage.eINSTANCE.getOperation_Class_(), |
| UMLPackage.eINSTANCE.getOperation_Datatype()})); |
| } |
| return featuringClassifier; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public List getRedefinedElements() { |
| List redefinedElement = (List) eVirtualGet(UMLPackage.OPERATION__REDEFINED_ELEMENT); |
| if (redefinedElement == null) { |
| eVirtualSet(UMLPackage.OPERATION__REDEFINED_ELEMENT, |
| redefinedElement = new DerivedUnionEObjectEList( |
| RedefinableElement.class, this, |
| UMLPackage.OPERATION__REDEFINED_ELEMENT, |
| new EStructuralFeature[]{UMLPackage.eINSTANCE |
| .getOperation_RedefinedOperation()})); |
| } |
| return redefinedElement; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public List getOwnedRules() { |
| List ownedRule = (List) eVirtualGet(UMLPackage.OPERATION__OWNED_RULE); |
| if (ownedRule == null) { |
| eVirtualSet(UMLPackage.OPERATION__OWNED_RULE, |
| ownedRule = new SupersetEObjectContainmentWithInverseEList( |
| Constraint.class, this, UMLPackage.OPERATION__OWNED_RULE, |
| new int[]{UMLPackage.OPERATION__PRECONDITION, |
| UMLPackage.OPERATION__POSTCONDITION, |
| UMLPackage.OPERATION__BODY_CONDITION}, |
| UMLPackage.CONSTRAINT__CONTEXT)); |
| } |
| return ownedRule; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isQuery() { |
| return (eFlags & IS_QUERY_EFLAG) != 0; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setIsQuery(boolean newIsQuery) { |
| boolean oldIsQuery = (eFlags & IS_QUERY_EFLAG) != 0; |
| if (newIsQuery) |
| eFlags |= IS_QUERY_EFLAG; |
| else |
| eFlags &= ~IS_QUERY_EFLAG; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, |
| UMLPackage.OPERATION__IS_QUERY, oldIsQuery, newIsQuery)); |
| |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isOrdered() { |
| return OperationOperations.isOrdered(this); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setIsOrdered(boolean newIsOrdered) { |
| OperationOperations.setIsOrdered(this, newIsOrdered); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isUnique() { |
| return OperationOperations.isUnique(this); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setIsUnique(boolean newIsUnique) { |
| OperationOperations.setIsUnique(this, newIsUnique); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public int getLower() { |
| return OperationOperations.getLower(this); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setLower(int newLower) { |
| OperationOperations.setLower(this, newLower); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public int getUpper() { |
| return OperationOperations.getUpper(this); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setUpper(int newUpper) { |
| OperationOperations.setUpper(this, newUpper); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public org.eclipse.uml2.uml.Class getClass_() { |
| if (eContainerFeatureID != UMLPackage.OPERATION__CLASS_) |
| return null; |
| return (org.eclipse.uml2.uml.Class) eContainer; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setClass_(org.eclipse.uml2.uml.Class newClass_) { |
| if (newClass_ != eContainer |
| || (eContainerFeatureID != UMLPackage.OPERATION__CLASS_ && newClass_ != null)) { |
| if (EcoreUtil.isAncestor(this, (EObject) newClass_)) |
| throw new IllegalArgumentException( |
| "Recursive containment not allowed for " + toString()); //$NON-NLS-1$ |
| NotificationChain msgs = null; |
| if (eContainer != null) |
| msgs = eBasicRemoveFromContainer(msgs); |
| if (newClass_ != null) |
| msgs = ((InternalEObject) newClass_).eInverseAdd(this, |
| UMLPackage.CLASS__OWNED_OPERATION, |
| org.eclipse.uml2.uml.Class.class, msgs); |
| msgs = eBasicSetContainer((InternalEObject) newClass_, |
| UMLPackage.OPERATION__CLASS_, msgs); |
| if (msgs != null) |
| msgs.dispatch(); |
| } else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, |
| UMLPackage.OPERATION__CLASS_, newClass_, newClass_)); |
| |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public List getPreconditions() { |
| List precondition = (List) eVirtualGet(UMLPackage.OPERATION__PRECONDITION); |
| if (precondition == null) { |
| eVirtualSet(UMLPackage.OPERATION__PRECONDITION, |
| precondition = new SubsetEObjectEList(Constraint.class, this, |
| UMLPackage.OPERATION__PRECONDITION, |
| new int[]{UMLPackage.OPERATION__OWNED_RULE})); |
| } |
| return precondition; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Constraint getPrecondition(String name) { |
| for (Iterator i = getPreconditions().iterator(); i.hasNext();) { |
| Constraint precondition = (Constraint) i.next(); |
| if (name.equals(precondition.getName())) { |
| return precondition; |
| } |
| } |
| return null; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public List getPostconditions() { |
| List postcondition = (List) eVirtualGet(UMLPackage.OPERATION__POSTCONDITION); |
| if (postcondition == null) { |
| eVirtualSet(UMLPackage.OPERATION__POSTCONDITION, |
| postcondition = new SubsetEObjectEList(Constraint.class, this, |
| UMLPackage.OPERATION__POSTCONDITION, |
| new int[]{UMLPackage.OPERATION__OWNED_RULE})); |
| } |
| return postcondition; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Constraint getPostcondition(String name) { |
| for (Iterator i = getPostconditions().iterator(); i.hasNext();) { |
| Constraint postcondition = (Constraint) i.next(); |
| if (name.equals(postcondition.getName())) { |
| return postcondition; |
| } |
| } |
| return null; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public List getRedefinedOperations() { |
| List redefinedOperation = (List) eVirtualGet(UMLPackage.OPERATION__REDEFINED_OPERATION); |
| if (redefinedOperation == null) { |
| eVirtualSet(UMLPackage.OPERATION__REDEFINED_OPERATION, |
| redefinedOperation = new EObjectResolvingEList(Operation.class, |
| this, UMLPackage.OPERATION__REDEFINED_OPERATION)); |
| } |
| return redefinedOperation; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Operation getRedefinedOperation(String name) { |
| for (Iterator i = getRedefinedOperations().iterator(); i.hasNext();) { |
| Operation redefinedOperation = (Operation) i.next(); |
| if (name.equals(redefinedOperation.getName())) { |
| return redefinedOperation; |
| } |
| } |
| return null; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public DataType getDatatype() { |
| if (eContainerFeatureID != UMLPackage.OPERATION__DATATYPE) |
| return null; |
| return (DataType) eContainer; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setDatatype(DataType newDatatype) { |
| if (newDatatype != eContainer |
| || (eContainerFeatureID != UMLPackage.OPERATION__DATATYPE && newDatatype != null)) { |
| if (EcoreUtil.isAncestor(this, (EObject) newDatatype)) |
| throw new IllegalArgumentException( |
| "Recursive containment not allowed for " + toString()); //$NON-NLS-1$ |
| NotificationChain msgs = null; |
| if (eContainer != null) |
| msgs = eBasicRemoveFromContainer(msgs); |
| if (newDatatype != null) |
| msgs = ((InternalEObject) newDatatype) |
| .eInverseAdd(this, UMLPackage.DATA_TYPE__OWNED_OPERATION, |
| DataType.class, msgs); |
| msgs = eBasicSetContainer((InternalEObject) newDatatype, |
| UMLPackage.OPERATION__DATATYPE, msgs); |
| if (msgs != null) |
| msgs.dispatch(); |
| } else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, |
| UMLPackage.OPERATION__DATATYPE, newDatatype, newDatatype)); |
| |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Constraint getBodyCondition() { |
| Constraint bodyCondition = (Constraint) eVirtualGet(UMLPackage.OPERATION__BODY_CONDITION); |
| return bodyCondition; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setBodyCondition(Constraint newBodyCondition) { |
| if (newBodyCondition != null |
| && !getOwnedRules().contains(newBodyCondition)) { |
| getOwnedRules().add(newBodyCondition); |
| } |
| Constraint bodyCondition = newBodyCondition; |
| Object oldBodyCondition = eVirtualSet( |
| UMLPackage.OPERATION__BODY_CONDITION, bodyCondition); |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, |
| UMLPackage.OPERATION__BODY_CONDITION, |
| oldBodyCondition == EVIRTUAL_NO_VALUE |
| ? null |
| : oldBodyCondition, bodyCondition)); |
| |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Type getType() { |
| Type type = basicGetType(); |
| return type == null |
| ? null |
| : (type.eIsProxy() |
| ? (Type) eResolveProxy((InternalEObject) type) |
| : type); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Type basicGetType() { |
| return OperationOperations.getType(this); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setType(Type newType) { |
| OperationOperations.setType(this, newType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Interface getInterface() { |
| if (eContainerFeatureID != UMLPackage.OPERATION__INTERFACE) |
| return null; |
| return (Interface) eContainer; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setInterface(Interface newInterface) { |
| if (newInterface != eContainer |
| || (eContainerFeatureID != UMLPackage.OPERATION__INTERFACE && newInterface != null)) { |
| if (EcoreUtil.isAncestor(this, (EObject) newInterface)) |
| throw new IllegalArgumentException( |
| "Recursive containment not allowed for " + toString()); //$NON-NLS-1$ |
| NotificationChain msgs = null; |
| if (eContainer != null) |
| msgs = eBasicRemoveFromContainer(msgs); |
| if (newInterface != null) |
| msgs = ((InternalEObject) newInterface).eInverseAdd(this, |
| UMLPackage.INTERFACE__OWNED_OPERATION, Interface.class, |
| msgs); |
| msgs = eBasicSetContainer((InternalEObject) newInterface, |
| UMLPackage.OPERATION__INTERFACE, msgs); |
| if (msgs != null) |
| msgs.dispatch(); |
| } else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, |
| UMLPackage.OPERATION__INTERFACE, newInterface, newInterface)); |
| |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public List getOwnedParameters() { |
| List ownedParameter = (List) eVirtualGet(UMLPackage.OPERATION__OWNED_PARAMETER); |
| if (ownedParameter == null) { |
| eVirtualSet(UMLPackage.OPERATION__OWNED_PARAMETER, |
| ownedParameter = new EObjectContainmentWithInverseEList( |
| Parameter.class, this, |
| UMLPackage.OPERATION__OWNED_PARAMETER, |
| UMLPackage.PARAMETER__OPERATION)); |
| } |
| return ownedParameter; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Parameter createOwnedParameter() { |
| Parameter newOwnedParameter = UMLFactory.eINSTANCE.createParameter(); |
| getOwnedParameters().add(newOwnedParameter); |
| return newOwnedParameter; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Parameter getOwnedParameter(String name) { |
| for (Iterator i = getOwnedParameters().iterator(); i.hasNext();) { |
| Parameter ownedParameter = (Parameter) i.next(); |
| if (name.equals(ownedParameter.getName())) { |
| return ownedParameter; |
| } |
| } |
| return null; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isSetOwnedParameters() { |
| List ownedParameter = (List) eVirtualGet(UMLPackage.OPERATION__OWNED_PARAMETER); |
| return ownedParameter != null && !ownedParameter.isEmpty(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public List getRaisedExceptions() { |
| List raisedException = (List) eVirtualGet(UMLPackage.OPERATION__RAISED_EXCEPTION); |
| if (raisedException == null) { |
| eVirtualSet(UMLPackage.OPERATION__RAISED_EXCEPTION, |
| raisedException = new EObjectResolvingEList(Type.class, this, |
| UMLPackage.OPERATION__RAISED_EXCEPTION)); |
| } |
| return raisedException; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Type getRaisedException(String name) { |
| for (Iterator i = getRaisedExceptions().iterator(); i.hasNext();) { |
| Type raisedException = (Type) i.next(); |
| if (name.equals(raisedException.getName())) { |
| return raisedException; |
| } |
| } |
| return null; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isSetRaisedExceptions() { |
| List raisedException = (List) eVirtualGet(UMLPackage.OPERATION__RAISED_EXCEPTION); |
| return raisedException != null && !raisedException.isEmpty(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isCompatibleWith(ParameterableElement p) { |
| return ParameterableElementOperations.isCompatibleWith(this, p); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isTemplateParameter() { |
| return ParameterableElementOperations.isTemplateParameter(this); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public List parameterableElements() { |
| CacheAdapter cache = getCacheAdapter(); |
| if (cache != null) { |
| List result = (List) cache.get(eResource(), this, |
| UMLPackage.eINSTANCE.getTemplateableElement().getEOperations() |
| .get(0)); |
| if (result == null) { |
| cache.put(eResource(), this, UMLPackage.eINSTANCE |
| .getTemplateableElement().getEOperations().get(0), |
| result = TemplateableElementOperations |
| .parameterableElements(this)); |
| } |
| return result; |
| } |
| return TemplateableElementOperations.parameterableElements(this); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isTemplate() { |
| return TemplateableElementOperations.isTemplate(this); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean validateAtMostOneReturn(DiagnosticChain diagnostics, |
| Map context) { |
| return OperationOperations.validateAtMostOneReturn(this, diagnostics, |
| context); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean validateOnlyBodyForQuery(DiagnosticChain diagnostics, |
| Map context) { |
| return OperationOperations.validateOnlyBodyForQuery(this, diagnostics, |
| context); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public int lowerBound() { |
| return OperationOperations.lowerBound(this); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public int upperBound() { |
| return OperationOperations.upperBound(this); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public List returnResult() { |
| CacheAdapter cache = getCacheAdapter(); |
| if (cache != null) { |
| List result = (List) cache.get(eResource(), this, |
| UMLPackage.eINSTANCE.getOperation().getEOperations().get(7)); |
| if (result == null) { |
| cache.put(eResource(), this, UMLPackage.eINSTANCE |
| .getOperation().getEOperations().get(7), |
| result = OperationOperations.returnResult(this)); |
| } |
| return result; |
| } |
| return OperationOperations.returnResult(this); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isConsistentWith(RedefinableElement redefinee) { |
| return OperationOperations.isConsistentWith(this, redefinee); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain eInverseAdd(InternalEObject otherEnd, |
| int featureID, Class baseClass, NotificationChain msgs) { |
| if (featureID >= 0) { |
| switch (eDerivedStructuralFeatureID(featureID, baseClass)) { |
| case UMLPackage.OPERATION__EANNOTATIONS : |
| return ((InternalEList) getEAnnotations()).basicAdd( |
| otherEnd, msgs); |
| case UMLPackage.OPERATION__CLIENT_DEPENDENCY : |
| return ((InternalEList) getClientDependencies()).basicAdd( |
| otherEnd, msgs); |
| case UMLPackage.OPERATION__ELEMENT_IMPORT : |
| return ((InternalEList) getElementImports()).basicAdd( |
| otherEnd, msgs); |
| case UMLPackage.OPERATION__PACKAGE_IMPORT : |
| return ((InternalEList) getPackageImports()).basicAdd( |
| otherEnd, msgs); |
| case UMLPackage.OPERATION__OWNED_RULE : |
| return ((InternalEList) getOwnedRules()).basicAdd(otherEnd, |
| msgs); |
| case UMLPackage.OPERATION__METHOD : |
| return ((InternalEList) getMethods()).basicAdd(otherEnd, |
| msgs); |
| case UMLPackage.OPERATION__TEMPLATE_PARAMETER : |
| TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.OPERATION__TEMPLATE_PARAMETER); |
| if (templateParameter != null) |
| msgs = ((InternalEObject) templateParameter) |
| .eInverseRemove( |
| this, |
| UMLPackage.TEMPLATE_PARAMETER__PARAMETERED_ELEMENT, |
| TemplateParameter.class, msgs); |
| return basicSetTemplateParameter( |
| (TemplateParameter) otherEnd, msgs); |
| case UMLPackage.OPERATION__OWNING_TEMPLATE_PARAMETER : |
| if (eContainer != null) |
| msgs = eBasicRemoveFromContainer(msgs); |
| return eBasicSetContainer(otherEnd, |
| UMLPackage.OPERATION__OWNING_TEMPLATE_PARAMETER, msgs); |
| case UMLPackage.OPERATION__TEMPLATE_BINDING : |
| return ((InternalEList) getTemplateBindings()).basicAdd( |
| otherEnd, msgs); |
| case UMLPackage.OPERATION__OWNED_TEMPLATE_SIGNATURE : |
| TemplateSignature ownedTemplateSignature = (TemplateSignature) eVirtualGet(UMLPackage.OPERATION__OWNED_TEMPLATE_SIGNATURE); |
| if (ownedTemplateSignature != null) |
| msgs = ((InternalEObject) ownedTemplateSignature) |
| .eInverseRemove( |
| this, |
| EOPPOSITE_FEATURE_BASE |
| - UMLPackage.OPERATION__OWNED_TEMPLATE_SIGNATURE, |
| null, msgs); |
| return basicSetOwnedTemplateSignature( |
| (TemplateSignature) otherEnd, msgs); |
| case UMLPackage.OPERATION__CLASS_ : |
| if (eContainer != null) |
| msgs = eBasicRemoveFromContainer(msgs); |
| return eBasicSetContainer(otherEnd, |
| UMLPackage.OPERATION__CLASS_, msgs); |
| case UMLPackage.OPERATION__DATATYPE : |
| if (eContainer != null) |
| msgs = eBasicRemoveFromContainer(msgs); |
| return eBasicSetContainer(otherEnd, |
| UMLPackage.OPERATION__DATATYPE, msgs); |
| case UMLPackage.OPERATION__INTERFACE : |
| if (eContainer != null) |
| msgs = eBasicRemoveFromContainer(msgs); |
| return eBasicSetContainer(otherEnd, |
| UMLPackage.OPERATION__INTERFACE, msgs); |
| default : |
| return eDynamicInverseAdd(otherEnd, featureID, baseClass, |
| msgs); |
| } |
| } |
| if (eContainer != null) |
| msgs = eBasicRemoveFromContainer(msgs); |
| return eBasicSetContainer(otherEnd, featureID, msgs); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain eInverseRemove(InternalEObject otherEnd, |
| int featureID, Class baseClass, NotificationChain msgs) { |
| if (featureID >= 0) { |
| switch (eDerivedStructuralFeatureID(featureID, baseClass)) { |
| case UMLPackage.OPERATION__EANNOTATIONS : |
| return ((InternalEList) getEAnnotations()).basicRemove( |
| otherEnd, msgs); |
| case UMLPackage.OPERATION__OWNED_COMMENT : |
| return ((InternalEList) getOwnedComments()).basicRemove( |
| otherEnd, msgs); |
| case UMLPackage.OPERATION__CLIENT_DEPENDENCY : |
| return ((InternalEList) getClientDependencies()) |
| .basicRemove(otherEnd, msgs); |
| case UMLPackage.OPERATION__NAME_EXPRESSION : |
| return basicSetNameExpression(null, msgs); |
| case UMLPackage.OPERATION__ELEMENT_IMPORT : |
| return ((InternalEList) getElementImports()).basicRemove( |
| otherEnd, msgs); |
| case UMLPackage.OPERATION__PACKAGE_IMPORT : |
| return ((InternalEList) getPackageImports()).basicRemove( |
| otherEnd, msgs); |
| case UMLPackage.OPERATION__OWNED_RULE : |
| return ((InternalEList) getOwnedRules()).basicRemove( |
| otherEnd, msgs); |
| case UMLPackage.OPERATION__OWNED_PARAMETER : |
| return ((InternalEList) getOwnedParameters()).basicRemove( |
| otherEnd, msgs); |
| case UMLPackage.OPERATION__METHOD : |
| return ((InternalEList) getMethods()).basicRemove(otherEnd, |
| msgs); |
| case UMLPackage.OPERATION__OWNED_PARAMETER_SET : |
| return ((InternalEList) getOwnedParameterSets()) |
| .basicRemove(otherEnd, msgs); |
| case UMLPackage.OPERATION__TEMPLATE_PARAMETER : |
| return basicSetTemplateParameter(null, msgs); |
| case UMLPackage.OPERATION__OWNING_TEMPLATE_PARAMETER : |
| return eBasicSetContainer(null, |
| UMLPackage.OPERATION__OWNING_TEMPLATE_PARAMETER, msgs); |
| case UMLPackage.OPERATION__TEMPLATE_BINDING : |
| return ((InternalEList) getTemplateBindings()).basicRemove( |
| otherEnd, msgs); |
| case UMLPackage.OPERATION__OWNED_TEMPLATE_SIGNATURE : |
| return basicSetOwnedTemplateSignature(null, msgs); |
| case UMLPackage.OPERATION__CLASS_ : |
| return eBasicSetContainer(null, |
| UMLPackage.OPERATION__CLASS_, msgs); |
| case UMLPackage.OPERATION__DATATYPE : |
| return eBasicSetContainer(null, |
| UMLPackage.OPERATION__DATATYPE, msgs); |
| case UMLPackage.OPERATION__INTERFACE : |
| return eBasicSetContainer(null, |
| UMLPackage.OPERATION__INTERFACE, msgs); |
| default : |
| return eDynamicInverseRemove(otherEnd, featureID, |
| baseClass, msgs); |
| } |
| } |
| return eBasicSetContainer(null, featureID, msgs); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs) { |
| if (eContainerFeatureID >= 0) { |
| switch (eContainerFeatureID) { |
| case UMLPackage.OPERATION__OWNING_TEMPLATE_PARAMETER : |
| return eContainer |
| .eInverseRemove( |
| this, |
| UMLPackage.TEMPLATE_PARAMETER__OWNED_PARAMETERED_ELEMENT, |
| TemplateParameter.class, msgs); |
| case UMLPackage.OPERATION__CLASS_ : |
| return eContainer.eInverseRemove(this, |
| UMLPackage.CLASS__OWNED_OPERATION, |
| org.eclipse.uml2.uml.Class.class, msgs); |
| case UMLPackage.OPERATION__DATATYPE : |
| return eContainer.eInverseRemove(this, |
| UMLPackage.DATA_TYPE__OWNED_OPERATION, DataType.class, |
| msgs); |
| case UMLPackage.OPERATION__INTERFACE : |
| return eContainer.eInverseRemove(this, |
| UMLPackage.INTERFACE__OWNED_OPERATION, Interface.class, |
| msgs); |
| default : |
| return eDynamicBasicRemoveFromContainer(msgs); |
| } |
| } |
| return eContainer.eInverseRemove(this, EOPPOSITE_FEATURE_BASE |
| - eContainerFeatureID, null, msgs); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Object eGet(EStructuralFeature eFeature, boolean resolve) { |
| switch (eDerivedStructuralFeatureID(eFeature)) { |
| case UMLPackage.OPERATION__EANNOTATIONS : |
| return getEAnnotations(); |
| case UMLPackage.OPERATION__OWNED_ELEMENT : |
| return getOwnedElements(); |
| case UMLPackage.OPERATION__OWNER : |
| if (resolve) |
| return getOwner(); |
| return basicGetOwner(); |
| case UMLPackage.OPERATION__OWNED_COMMENT : |
| return getOwnedComments(); |
| case UMLPackage.OPERATION__NAME : |
| return getName(); |
| case UMLPackage.OPERATION__VISIBILITY : |
| return getVisibility(); |
| case UMLPackage.OPERATION__QUALIFIED_NAME : |
| return getQualifiedName(); |
| case UMLPackage.OPERATION__CLIENT_DEPENDENCY : |
| return getClientDependencies(); |
| case UMLPackage.OPERATION__NAMESPACE : |
| if (resolve) |
| return getNamespace(); |
| return basicGetNamespace(); |
| case UMLPackage.OPERATION__NAME_EXPRESSION : |
| return getNameExpression(); |
| case UMLPackage.OPERATION__ELEMENT_IMPORT : |
| return getElementImports(); |
| case UMLPackage.OPERATION__PACKAGE_IMPORT : |
| return getPackageImports(); |
| case UMLPackage.OPERATION__OWNED_RULE : |
| return getOwnedRules(); |
| case UMLPackage.OPERATION__MEMBER : |
| return getMembers(); |
| case UMLPackage.OPERATION__IMPORTED_MEMBER : |
| return getImportedMembers(); |
| case UMLPackage.OPERATION__OWNED_MEMBER : |
| return getOwnedMembers(); |
| case UMLPackage.OPERATION__IS_LEAF : |
| return isLeaf() |
| ? Boolean.TRUE |
| : Boolean.FALSE; |
| case UMLPackage.OPERATION__REDEFINED_ELEMENT : |
| return getRedefinedElements(); |
| case UMLPackage.OPERATION__REDEFINITION_CONTEXT : |
| return getRedefinitionContexts(); |
| case UMLPackage.OPERATION__IS_STATIC : |
| return isStatic() |
| ? Boolean.TRUE |
| : Boolean.FALSE; |
| case UMLPackage.OPERATION__FEATURING_CLASSIFIER : |
| return getFeaturingClassifiers(); |
| case UMLPackage.OPERATION__OWNED_PARAMETER : |
| return getOwnedParameters(); |
| case UMLPackage.OPERATION__IS_ABSTRACT : |
| return isAbstract() |
| ? Boolean.TRUE |
| : Boolean.FALSE; |
| case UMLPackage.OPERATION__METHOD : |
| return getMethods(); |
| case UMLPackage.OPERATION__CONCURRENCY : |
| return getConcurrency(); |
| case UMLPackage.OPERATION__RAISED_EXCEPTION : |
| return getRaisedExceptions(); |
| case UMLPackage.OPERATION__OWNED_PARAMETER_SET : |
| return getOwnedParameterSets(); |
| case UMLPackage.OPERATION__TEMPLATE_PARAMETER : |
| if (resolve) |
| return getTemplateParameter(); |
| return basicGetTemplateParameter(); |
| case UMLPackage.OPERATION__OWNING_TEMPLATE_PARAMETER : |
| return getOwningTemplateParameter(); |
| case UMLPackage.OPERATION__TEMPLATE_BINDING : |
| return getTemplateBindings(); |
| case UMLPackage.OPERATION__OWNED_TEMPLATE_SIGNATURE : |
| return getOwnedTemplateSignature(); |
| case UMLPackage.OPERATION__IS_QUERY : |
| return isQuery() |
| ? Boolean.TRUE |
| : Boolean.FALSE; |
| case UMLPackage.OPERATION__IS_ORDERED : |
| return isOrdered() |
| ? Boolean.TRUE |
| : Boolean.FALSE; |
| case UMLPackage.OPERATION__IS_UNIQUE : |
| return isUnique() |
| ? Boolean.TRUE |
| : Boolean.FALSE; |
| case UMLPackage.OPERATION__LOWER : |
| return new Integer(getLower()); |
| case UMLPackage.OPERATION__UPPER : |
| return new Integer(getUpper()); |
| case UMLPackage.OPERATION__CLASS_ : |
| return getClass_(); |
| case UMLPackage.OPERATION__PRECONDITION : |
| return getPreconditions(); |
| case UMLPackage.OPERATION__POSTCONDITION : |
| return getPostconditions(); |
| case UMLPackage.OPERATION__REDEFINED_OPERATION : |
| return getRedefinedOperations(); |
| case UMLPackage.OPERATION__DATATYPE : |
| return getDatatype(); |
| case UMLPackage.OPERATION__BODY_CONDITION : |
| return getBodyCondition(); |
| case UMLPackage.OPERATION__TYPE : |
| if (resolve) |
| return getType(); |
| return basicGetType(); |
| case UMLPackage.OPERATION__INTERFACE : |
| return getInterface(); |
| } |
| return eDynamicGet(eFeature, resolve); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void eSet(EStructuralFeature eFeature, Object newValue) { |
| switch (eDerivedStructuralFeatureID(eFeature)) { |
| case UMLPackage.OPERATION__EANNOTATIONS : |
| getEAnnotations().clear(); |
| getEAnnotations().addAll((Collection) newValue); |
| return; |
| case UMLPackage.OPERATION__OWNED_COMMENT : |
| getOwnedComments().clear(); |
| getOwnedComments().addAll((Collection) newValue); |
| return; |
| case UMLPackage.OPERATION__NAME : |
| setName((String) newValue); |
| return; |
| case UMLPackage.OPERATION__VISIBILITY : |
| setVisibility((VisibilityKind) newValue); |
| return; |
| case UMLPackage.OPERATION__CLIENT_DEPENDENCY : |
| getClientDependencies().clear(); |
| getClientDependencies().addAll((Collection) newValue); |
| return; |
| case UMLPackage.OPERATION__NAME_EXPRESSION : |
| setNameExpression((StringExpression) newValue); |
| return; |
| case UMLPackage.OPERATION__ELEMENT_IMPORT : |
| getElementImports().clear(); |
| getElementImports().addAll((Collection) newValue); |
| return; |
| case UMLPackage.OPERATION__PACKAGE_IMPORT : |
| getPackageImports().clear(); |
| getPackageImports().addAll((Collection) newValue); |
| return; |
| case UMLPackage.OPERATION__OWNED_RULE : |
| getOwnedRules().clear(); |
| getOwnedRules().addAll((Collection) newValue); |
| return; |
| case UMLPackage.OPERATION__IS_LEAF : |
| setIsLeaf(((Boolean) newValue).booleanValue()); |
| return; |
| case UMLPackage.OPERATION__IS_STATIC : |
| setIsStatic(((Boolean) newValue).booleanValue()); |
| return; |
| case UMLPackage.OPERATION__OWNED_PARAMETER : |
| getOwnedParameters().clear(); |
| getOwnedParameters().addAll((Collection) newValue); |
| return; |
| case UMLPackage.OPERATION__IS_ABSTRACT : |
| setIsAbstract(((Boolean) newValue).booleanValue()); |
| return; |
| case UMLPackage.OPERATION__METHOD : |
| getMethods().clear(); |
| getMethods().addAll((Collection) newValue); |
| return; |
| case UMLPackage.OPERATION__CONCURRENCY : |
| setConcurrency((CallConcurrencyKind) newValue); |
| return; |
| case UMLPackage.OPERATION__RAISED_EXCEPTION : |
| getRaisedExceptions().clear(); |
| getRaisedExceptions().addAll((Collection) newValue); |
| return; |
| case UMLPackage.OPERATION__OWNED_PARAMETER_SET : |
| getOwnedParameterSets().clear(); |
| getOwnedParameterSets().addAll((Collection) newValue); |
| return; |
| case UMLPackage.OPERATION__TEMPLATE_PARAMETER : |
| setTemplateParameter((TemplateParameter) newValue); |
| return; |
| case UMLPackage.OPERATION__OWNING_TEMPLATE_PARAMETER : |
| setOwningTemplateParameter((TemplateParameter) newValue); |
| return; |
| case UMLPackage.OPERATION__TEMPLATE_BINDING : |
| getTemplateBindings().clear(); |
| getTemplateBindings().addAll((Collection) newValue); |
| return; |
| case UMLPackage.OPERATION__OWNED_TEMPLATE_SIGNATURE : |
| setOwnedTemplateSignature((TemplateSignature) newValue); |
| return; |
| case UMLPackage.OPERATION__IS_QUERY : |
| setIsQuery(((Boolean) newValue).booleanValue()); |
| return; |
| case UMLPackage.OPERATION__IS_ORDERED : |
| setIsOrdered(((Boolean) newValue).booleanValue()); |
| return; |
| case UMLPackage.OPERATION__IS_UNIQUE : |
| setIsUnique(((Boolean) newValue).booleanValue()); |
| return; |
| case UMLPackage.OPERATION__LOWER : |
| setLower(((Integer) newValue).intValue()); |
| return; |
| case UMLPackage.OPERATION__UPPER : |
| setUpper(((Integer) newValue).intValue()); |
| return; |
| case UMLPackage.OPERATION__CLASS_ : |
| setClass_((org.eclipse.uml2.uml.Class) newValue); |
| return; |
| case UMLPackage.OPERATION__PRECONDITION : |
| getPreconditions().clear(); |
| getPreconditions().addAll((Collection) newValue); |
| return; |
| case UMLPackage.OPERATION__POSTCONDITION : |
| getPostconditions().clear(); |
| getPostconditions().addAll((Collection) newValue); |
| return; |
| case UMLPackage.OPERATION__REDEFINED_OPERATION : |
| getRedefinedOperations().clear(); |
| getRedefinedOperations().addAll((Collection) newValue); |
| return; |
| case UMLPackage.OPERATION__DATATYPE : |
| setDatatype((DataType) newValue); |
| return; |
| case UMLPackage.OPERATION__BODY_CONDITION : |
| setBodyCondition((Constraint) newValue); |
| return; |
| case UMLPackage.OPERATION__TYPE : |
| setType((Type) newValue); |
| return; |
| case UMLPackage.OPERATION__INTERFACE : |
| setInterface((Interface) newValue); |
| return; |
| } |
| eDynamicSet(eFeature, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void eUnset(EStructuralFeature eFeature) { |
| switch (eDerivedStructuralFeatureID(eFeature)) { |
| case UMLPackage.OPERATION__EANNOTATIONS : |
| getEAnnotations().clear(); |
| return; |
| case UMLPackage.OPERATION__OWNED_COMMENT : |
| getOwnedComments().clear(); |
| return; |
| case UMLPackage.OPERATION__NAME : |
| setName(NAME_EDEFAULT); |
| return; |
| case UMLPackage.OPERATION__VISIBILITY : |
| setVisibility(VISIBILITY_EDEFAULT); |
| return; |
| case UMLPackage.OPERATION__CLIENT_DEPENDENCY : |
| getClientDependencies().clear(); |
| return; |
| case UMLPackage.OPERATION__NAME_EXPRESSION : |
| setNameExpression((StringExpression) null); |
| return; |
| case UMLPackage.OPERATION__ELEMENT_IMPORT : |
| getElementImports().clear(); |
| return; |
| case UMLPackage.OPERATION__PACKAGE_IMPORT : |
| getPackageImports().clear(); |
| return; |
| case UMLPackage.OPERATION__OWNED_RULE : |
| getOwnedRules().clear(); |
| return; |
| case UMLPackage.OPERATION__IS_LEAF : |
| setIsLeaf(IS_LEAF_EDEFAULT); |
| return; |
| case UMLPackage.OPERATION__IS_STATIC : |
| setIsStatic(IS_STATIC_EDEFAULT); |
| return; |
| case UMLPackage.OPERATION__OWNED_PARAMETER : |
| getOwnedParameters().clear(); |
| return; |
| case UMLPackage.OPERATION__IS_ABSTRACT : |
| setIsAbstract(IS_ABSTRACT_EDEFAULT); |
| return; |
| case UMLPackage.OPERATION__METHOD : |
| getMethods().clear(); |
| return; |
| case UMLPackage.OPERATION__CONCURRENCY : |
| setConcurrency(CONCURRENCY_EDEFAULT); |
| return; |
| case UMLPackage.OPERATION__RAISED_EXCEPTION : |
| getRaisedExceptions().clear(); |
| return; |
| case UMLPackage.OPERATION__OWNED_PARAMETER_SET : |
| getOwnedParameterSets().clear(); |
| return; |
| case UMLPackage.OPERATION__TEMPLATE_PARAMETER : |
| setTemplateParameter((TemplateParameter) null); |
| return; |
| case UMLPackage.OPERATION__OWNING_TEMPLATE_PARAMETER : |
| setOwningTemplateParameter((TemplateParameter) null); |
| return; |
| case UMLPackage.OPERATION__TEMPLATE_BINDING : |
| getTemplateBindings().clear(); |
| return; |
| case UMLPackage.OPERATION__OWNED_TEMPLATE_SIGNATURE : |
| setOwnedTemplateSignature((TemplateSignature) null); |
| return; |
| case UMLPackage.OPERATION__IS_QUERY : |
| setIsQuery(IS_QUERY_EDEFAULT); |
| return; |
| case UMLPackage.OPERATION__IS_ORDERED : |
| setIsOrdered(IS_ORDERED_EDEFAULT); |
| return; |
| case UMLPackage.OPERATION__IS_UNIQUE : |
| setIsUnique(IS_UNIQUE_EDEFAULT); |
| return; |
| case UMLPackage.OPERATION__LOWER : |
| setLower(LOWER_EDEFAULT); |
| return; |
| case UMLPackage.OPERATION__UPPER : |
| setUpper(UPPER_EDEFAULT); |
| return; |
| case UMLPackage.OPERATION__CLASS_ : |
| setClass_((org.eclipse.uml2.uml.Class) null); |
| return; |
| case UMLPackage.OPERATION__PRECONDITION : |
| getPreconditions().clear(); |
| return; |
| case UMLPackage.OPERATION__POSTCONDITION : |
| getPostconditions().clear(); |
| return; |
| case UMLPackage.OPERATION__REDEFINED_OPERATION : |
| getRedefinedOperations().clear(); |
| return; |
| case UMLPackage.OPERATION__DATATYPE : |
| setDatatype((DataType) null); |
| return; |
| case UMLPackage.OPERATION__BODY_CONDITION : |
| setBodyCondition((Constraint) null); |
| return; |
| case UMLPackage.OPERATION__TYPE : |
| setType((Type) null); |
| return; |
| case UMLPackage.OPERATION__INTERFACE : |
| setInterface((Interface) null); |
| return; |
| } |
| eDynamicUnset(eFeature); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean eIsSet(EStructuralFeature eFeature) { |
| switch (eDerivedStructuralFeatureID(eFeature)) { |
| case UMLPackage.OPERATION__EANNOTATIONS : |
| return eAnnotations != null && !eAnnotations.isEmpty(); |
| case UMLPackage.OPERATION__OWNED_ELEMENT : |
| return isSetOwnedElements(); |
| case UMLPackage.OPERATION__OWNER : |
| return isSetOwner(); |
| case UMLPackage.OPERATION__OWNED_COMMENT : |
| List ownedComment = (List) eVirtualGet(UMLPackage.OPERATION__OWNED_COMMENT); |
| return ownedComment != null && !ownedComment.isEmpty(); |
| case UMLPackage.OPERATION__NAME : |
| String name = eVirtualIsSet(UMLPackage.OPERATION__NAME) |
| ? (String) eVirtualGet(UMLPackage.OPERATION__NAME) |
| : NAME_EDEFAULT; |
| return NAME_EDEFAULT == null |
| ? name != null |
| : !NAME_EDEFAULT.equals(name); |
| case UMLPackage.OPERATION__VISIBILITY : |
| return eVirtualIsSet(UMLPackage.OPERATION__VISIBILITY) |
| && eVirtualGet(UMLPackage.OPERATION__VISIBILITY) != VISIBILITY_EDEFAULT; |
| case UMLPackage.OPERATION__QUALIFIED_NAME : |
| return QUALIFIED_NAME_EDEFAULT == null |
| ? getQualifiedName() != null |
| : !QUALIFIED_NAME_EDEFAULT.equals(getQualifiedName()); |
| case UMLPackage.OPERATION__CLIENT_DEPENDENCY : |
| List clientDependency = (List) eVirtualGet(UMLPackage.OPERATION__CLIENT_DEPENDENCY); |
| return clientDependency != null && !clientDependency.isEmpty(); |
| case UMLPackage.OPERATION__NAMESPACE : |
| return isSetNamespace(); |
| case UMLPackage.OPERATION__NAME_EXPRESSION : |
| return eVirtualGet(UMLPackage.OPERATION__NAME_EXPRESSION) != null; |
| case UMLPackage.OPERATION__ELEMENT_IMPORT : |
| List elementImport = (List) eVirtualGet(UMLPackage.OPERATION__ELEMENT_IMPORT); |
| return elementImport != null && !elementImport.isEmpty(); |
| case UMLPackage.OPERATION__PACKAGE_IMPORT : |
| List packageImport = (List) eVirtualGet(UMLPackage.OPERATION__PACKAGE_IMPORT); |
| return packageImport != null && !packageImport.isEmpty(); |
| case UMLPackage.OPERATION__OWNED_RULE : |
| List ownedRule = (List) eVirtualGet(UMLPackage.OPERATION__OWNED_RULE); |
| return ownedRule != null && !ownedRule.isEmpty(); |
| case UMLPackage.OPERATION__MEMBER : |
| return isSetMembers(); |
| case UMLPackage.OPERATION__IMPORTED_MEMBER : |
| return !getImportedMembers().isEmpty(); |
| case UMLPackage.OPERATION__OWNED_MEMBER : |
| return isSetOwnedMembers(); |
| case UMLPackage.OPERATION__IS_LEAF : |
| return ((eFlags & IS_LEAF_EFLAG) != 0) != IS_LEAF_EDEFAULT; |
| case UMLPackage.OPERATION__REDEFINED_ELEMENT : |
| return isSetRedefinedElements(); |
| case UMLPackage.OPERATION__REDEFINITION_CONTEXT : |
| return isSetRedefinitionContexts(); |
| case UMLPackage.OPERATION__IS_STATIC : |
| return ((eFlags & IS_STATIC_EFLAG) != 0) != IS_STATIC_EDEFAULT; |
| case UMLPackage.OPERATION__FEATURING_CLASSIFIER : |
| return isSetFeaturingClassifiers(); |
| case UMLPackage.OPERATION__OWNED_PARAMETER : |
| List ownedParameter = (List) eVirtualGet(UMLPackage.OPERATION__OWNED_PARAMETER); |
| return ownedParameter != null && !ownedParameter.isEmpty(); |
| case UMLPackage.OPERATION__IS_ABSTRACT : |
| return ((eFlags & IS_ABSTRACT_EFLAG) != 0) != IS_ABSTRACT_EDEFAULT; |
| case UMLPackage.OPERATION__METHOD : |
| List method = (List) eVirtualGet(UMLPackage.OPERATION__METHOD); |
| return method != null && !method.isEmpty(); |
| case UMLPackage.OPERATION__CONCURRENCY : |
| return eVirtualIsSet(UMLPackage.OPERATION__CONCURRENCY) |
| && eVirtualGet(UMLPackage.OPERATION__CONCURRENCY) != CONCURRENCY_EDEFAULT; |
| case UMLPackage.OPERATION__RAISED_EXCEPTION : |
| List raisedException = (List) eVirtualGet(UMLPackage.OPERATION__RAISED_EXCEPTION); |
| return raisedException != null && !raisedException.isEmpty(); |
| case UMLPackage.OPERATION__OWNED_PARAMETER_SET : |
| List ownedParameterSet = (List) eVirtualGet(UMLPackage.OPERATION__OWNED_PARAMETER_SET); |
| return ownedParameterSet != null |
| && !ownedParameterSet.isEmpty(); |
| case UMLPackage.OPERATION__TEMPLATE_PARAMETER : |
| return eVirtualGet(UMLPackage.OPERATION__TEMPLATE_PARAMETER) != null; |
| case UMLPackage.OPERATION__OWNING_TEMPLATE_PARAMETER : |
| return getOwningTemplateParameter() != null; |
| case UMLPackage.OPERATION__TEMPLATE_BINDING : |
| List templateBinding = (List) eVirtualGet(UMLPackage.OPERATION__TEMPLATE_BINDING); |
| return templateBinding != null && !templateBinding.isEmpty(); |
| case UMLPackage.OPERATION__OWNED_TEMPLATE_SIGNATURE : |
| return eVirtualGet(UMLPackage.OPERATION__OWNED_TEMPLATE_SIGNATURE) != null; |
| case UMLPackage.OPERATION__IS_QUERY : |
| return ((eFlags & IS_QUERY_EFLAG) != 0) != IS_QUERY_EDEFAULT; |
| case UMLPackage.OPERATION__IS_ORDERED : |
| return isOrdered() != IS_ORDERED_EDEFAULT; |
| case UMLPackage.OPERATION__IS_UNIQUE : |
| return isUnique() != IS_UNIQUE_EDEFAULT; |
| case UMLPackage.OPERATION__LOWER : |
| return getLower() != LOWER_EDEFAULT; |
| case UMLPackage.OPERATION__UPPER : |
| return getUpper() != UPPER_EDEFAULT; |
| case UMLPackage.OPERATION__CLASS_ : |
| return getClass_() != null; |
| case UMLPackage.OPERATION__PRECONDITION : |
| List precondition = (List) eVirtualGet(UMLPackage.OPERATION__PRECONDITION); |
| return precondition != null && !precondition.isEmpty(); |
| case UMLPackage.OPERATION__POSTCONDITION : |
| List postcondition = (List) eVirtualGet(UMLPackage.OPERATION__POSTCONDITION); |
| return postcondition != null && !postcondition.isEmpty(); |
| case UMLPackage.OPERATION__REDEFINED_OPERATION : |
| List redefinedOperation = (List) eVirtualGet(UMLPackage.OPERATION__REDEFINED_OPERATION); |
| return redefinedOperation != null |
| && !redefinedOperation.isEmpty(); |
| case UMLPackage.OPERATION__DATATYPE : |
| return getDatatype() != null; |
| case UMLPackage.OPERATION__BODY_CONDITION : |
| return eVirtualGet(UMLPackage.OPERATION__BODY_CONDITION) != null; |
| case UMLPackage.OPERATION__TYPE : |
| return basicGetType() != null; |
| case UMLPackage.OPERATION__INTERFACE : |
| return getInterface() != null; |
| } |
| return eDynamicIsSet(eFeature); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { |
| if (baseClass == ParameterableElement.class) { |
| switch (derivedFeatureID) { |
| case UMLPackage.OPERATION__TEMPLATE_PARAMETER : |
| return UMLPackage.PARAMETERABLE_ELEMENT__TEMPLATE_PARAMETER; |
| case UMLPackage.OPERATION__OWNING_TEMPLATE_PARAMETER : |
| return UMLPackage.PARAMETERABLE_ELEMENT__OWNING_TEMPLATE_PARAMETER; |
| default : |
| return -1; |
| } |
| } |
| if (baseClass == TemplateableElement.class) { |
| switch (derivedFeatureID) { |
| case UMLPackage.OPERATION__TEMPLATE_BINDING : |
| return UMLPackage.TEMPLATEABLE_ELEMENT__TEMPLATE_BINDING; |
| case UMLPackage.OPERATION__OWNED_TEMPLATE_SIGNATURE : |
| return UMLPackage.TEMPLATEABLE_ELEMENT__OWNED_TEMPLATE_SIGNATURE; |
| default : |
| return -1; |
| } |
| } |
| return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { |
| if (baseClass == ParameterableElement.class) { |
| switch (baseFeatureID) { |
| case UMLPackage.PARAMETERABLE_ELEMENT__TEMPLATE_PARAMETER : |
| return UMLPackage.OPERATION__TEMPLATE_PARAMETER; |
| case UMLPackage.PARAMETERABLE_ELEMENT__OWNING_TEMPLATE_PARAMETER : |
| return UMLPackage.OPERATION__OWNING_TEMPLATE_PARAMETER; |
| default : |
| return -1; |
| } |
| } |
| if (baseClass == TemplateableElement.class) { |
| switch (baseFeatureID) { |
| case UMLPackage.TEMPLATEABLE_ELEMENT__TEMPLATE_BINDING : |
| return UMLPackage.OPERATION__TEMPLATE_BINDING; |
| case UMLPackage.TEMPLATEABLE_ELEMENT__OWNED_TEMPLATE_SIGNATURE : |
| return UMLPackage.OPERATION__OWNED_TEMPLATE_SIGNATURE; |
| default : |
| return -1; |
| } |
| } |
| return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected int eVirtualIndexBits(int offset) { |
| switch (offset) { |
| case 0 : |
| return eVirtualIndexBits0; |
| case 1 : |
| return eVirtualIndexBits1; |
| default : |
| throw new IndexOutOfBoundsException(); |
| } |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void eSetVirtualIndexBits(int offset, int newIndexBits) { |
| switch (offset) { |
| case 0 : |
| eVirtualIndexBits0 = newIndexBits; |
| break; |
| case 1 : |
| eVirtualIndexBits1 = newIndexBits; |
| break; |
| default : |
| throw new IndexOutOfBoundsException(); |
| } |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String toString() { |
| if (eIsProxy()) |
| return super.toString(); |
| |
| StringBuffer result = new StringBuffer(super.toString()); |
| result.append(" (isQuery: "); //$NON-NLS-1$ |
| result.append((eFlags & IS_QUERY_EFLAG) != 0); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Element basicGetOwner() { |
| TemplateParameter owningTemplateParameter = getOwningTemplateParameter(); |
| if (owningTemplateParameter != null) { |
| return owningTemplateParameter; |
| } |
| return super.basicGetOwner(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isSetOwner() { |
| return super.isSetOwner() |
| || eIsSet(UMLPackage.eINSTANCE |
| .getParameterableElement_OwningTemplateParameter()); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isSetOwnedElements() { |
| return super.isSetOwnedElements() |
| || eIsSet(UMLPackage.eINSTANCE |
| .getTemplateableElement_TemplateBinding()) |
| || eIsSet(UMLPackage.eINSTANCE |
| .getTemplateableElement_OwnedTemplateSignature()); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isSetRedefinitionContexts() { |
| return super.isSetRedefinitionContexts() |
| || eIsSet(UMLPackage.eINSTANCE.getOperation_Class_()) |
| || eIsSet(UMLPackage.eINSTANCE.getOperation_Datatype()) |
| || eIsSet(UMLPackage.eINSTANCE.getOperation_Interface()); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Namespace basicGetNamespace() { |
| org.eclipse.uml2.uml.Class class_ = getClass_(); |
| if (class_ != null) { |
| return class_; |
| } |
| DataType datatype = getDatatype(); |
| if (datatype != null) { |
| return datatype; |
| } |
| return super.basicGetNamespace(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isSetNamespace() { |
| return super.isSetNamespace() |
| || eIsSet(UMLPackage.eINSTANCE.getOperation_Class_()) |
| || eIsSet(UMLPackage.eINSTANCE.getOperation_Datatype()); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isSetFeaturingClassifiers() { |
| return super.isSetFeaturingClassifiers() |
| || eIsSet(UMLPackage.eINSTANCE.getOperation_Class_()) |
| || eIsSet(UMLPackage.eINSTANCE.getOperation_Datatype()); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isSetRedefinedElements() { |
| return super.isSetRedefinedElements() |
| || eIsSet(UMLPackage.eINSTANCE.getOperation_RedefinedOperation()); |
| } |
| |
| } //OperationImpl |