| /* |
| * Copyright (c) 2005, 2006 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: BehavioralFeatureImpl.java,v 1.20 2006/11/14 18:02:17 khussey Exp $ |
| */ |
| package org.eclipse.uml2.uml.internal.impl; |
| |
| import java.util.Collection; |
| import java.util.Iterator; |
| 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.common.util.EList; |
| |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.InternalEObject; |
| |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| |
| import org.eclipse.emf.ecore.resource.Resource; |
| |
| import org.eclipse.emf.ecore.util.EObjectContainmentEList; |
| import org.eclipse.emf.ecore.util.EObjectResolvingEList; |
| import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; |
| 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.uml.Behavior; |
| import org.eclipse.uml2.uml.BehavioralFeature; |
| import org.eclipse.uml2.uml.CallConcurrencyKind; |
| import org.eclipse.uml2.uml.Classifier; |
| import org.eclipse.uml2.uml.Feature; |
| import org.eclipse.uml2.uml.NamedElement; |
| import org.eclipse.uml2.uml.Namespace; |
| import org.eclipse.uml2.uml.Parameter; |
| import org.eclipse.uml2.uml.ParameterSet; |
| import org.eclipse.uml2.uml.RedefinableElement; |
| import org.eclipse.uml2.uml.StringExpression; |
| import org.eclipse.uml2.uml.Type; |
| import org.eclipse.uml2.uml.UMLPackage; |
| import org.eclipse.uml2.uml.VisibilityKind; |
| |
| import org.eclipse.uml2.uml.internal.operations.BehavioralFeatureOperations; |
| import org.eclipse.uml2.uml.internal.operations.RedefinableElementOperations; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Behavioral Feature</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * <ul> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.BehavioralFeatureImpl#getRedefinedElements <em>Redefined Element</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.BehavioralFeatureImpl#getRedefinitionContexts <em>Redefinition Context</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.BehavioralFeatureImpl#isLeaf <em>Is Leaf</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.BehavioralFeatureImpl#getFeaturingClassifiers <em>Featuring Classifier</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.BehavioralFeatureImpl#isStatic <em>Is Static</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.BehavioralFeatureImpl#getOwnedMembers <em>Owned Member</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.BehavioralFeatureImpl#getOwnedParameters <em>Owned Parameter</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.BehavioralFeatureImpl#isAbstract <em>Is Abstract</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.BehavioralFeatureImpl#getMethods <em>Method</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.BehavioralFeatureImpl#getConcurrency <em>Concurrency</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.BehavioralFeatureImpl#getRaisedExceptions <em>Raised Exception</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.BehavioralFeatureImpl#getOwnedParameterSets <em>Owned Parameter Set</em>}</li> |
| * </ul> |
| * </p> |
| * |
| * @generated |
| */ |
| public abstract class BehavioralFeatureImpl |
| extends NamespaceImpl |
| implements BehavioralFeature { |
| |
| /** |
| * The default value of the '{@link #isLeaf() <em>Is Leaf</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isLeaf() |
| * @generated |
| * @ordered |
| */ |
| protected static final boolean IS_LEAF_EDEFAULT = false; |
| |
| /** |
| * The flag representing the value of the '{@link #isLeaf() <em>Is Leaf</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isLeaf() |
| * @generated |
| * @ordered |
| */ |
| protected static final int IS_LEAF_EFLAG = 1 << 10; |
| |
| /** |
| * The default value of the '{@link #isStatic() <em>Is Static</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isStatic() |
| * @generated |
| * @ordered |
| */ |
| protected static final boolean IS_STATIC_EDEFAULT = false; |
| |
| /** |
| * The flag representing the value of the '{@link #isStatic() <em>Is Static</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isStatic() |
| * @generated |
| * @ordered |
| */ |
| protected static final int IS_STATIC_EFLAG = 1 << 11; |
| |
| /** |
| * The cached value of the '{@link #getOwnedParameters() <em>Owned Parameter</em>}' containment reference list. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getOwnedParameters() |
| * @generated |
| * @ordered |
| */ |
| protected EList ownedParameters = null; |
| |
| /** |
| * The default value of the '{@link #isAbstract() <em>Is Abstract</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isAbstract() |
| * @generated |
| * @ordered |
| */ |
| protected static final boolean IS_ABSTRACT_EDEFAULT = false; |
| |
| /** |
| * The flag representing the value of the '{@link #isAbstract() <em>Is Abstract</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isAbstract() |
| * @generated |
| * @ordered |
| */ |
| protected static final int IS_ABSTRACT_EFLAG = 1 << 12; |
| |
| /** |
| * The cached value of the '{@link #getMethods() <em>Method</em>}' reference list. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getMethods() |
| * @generated |
| * @ordered |
| */ |
| protected EList methods = null; |
| |
| /** |
| * The default value of the '{@link #getConcurrency() <em>Concurrency</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getConcurrency() |
| * @generated |
| * @ordered |
| */ |
| protected static final CallConcurrencyKind CONCURRENCY_EDEFAULT = CallConcurrencyKind.SEQUENTIAL_LITERAL; |
| |
| /** |
| * The cached value of the '{@link #getConcurrency() <em>Concurrency</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getConcurrency() |
| * @generated |
| * @ordered |
| */ |
| protected CallConcurrencyKind concurrency = CONCURRENCY_EDEFAULT; |
| |
| /** |
| * The cached value of the '{@link #getRaisedExceptions() <em>Raised Exception</em>}' reference list. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getRaisedExceptions() |
| * @generated |
| * @ordered |
| */ |
| protected EList raisedExceptions = null; |
| |
| /** |
| * The cached value of the '{@link #getOwnedParameterSets() <em>Owned Parameter Set</em>}' containment reference list. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getOwnedParameterSets() |
| * @generated |
| * @ordered |
| */ |
| protected EList ownedParameterSets = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected BehavioralFeatureImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected EClass eStaticClass() { |
| return UMLPackage.Literals.BEHAVIORAL_FEATURE; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EList getRedefinedElements() { |
| |
| CacheAdapter cache = getCacheAdapter(); |
| if (cache != null) { |
| Resource eResource = eResource(); |
| EList redefinedElements = (EList) cache.get(eResource, this, |
| UMLPackage.Literals.REDEFINABLE_ELEMENT__REDEFINED_ELEMENT); |
| if (redefinedElements == null) { |
| cache |
| .put( |
| eResource, |
| this, |
| UMLPackage.Literals.REDEFINABLE_ELEMENT__REDEFINED_ELEMENT, |
| redefinedElements = new DerivedUnionEObjectEList( |
| RedefinableElement.class, this, |
| UMLPackage.BEHAVIORAL_FEATURE__REDEFINED_ELEMENT, |
| null)); |
| } |
| return redefinedElements; |
| } |
| return new DerivedUnionEObjectEList(RedefinableElement.class, this, |
| UMLPackage.BEHAVIORAL_FEATURE__REDEFINED_ELEMENT, null); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public RedefinableElement getRedefinedElement(String name) { |
| return getRedefinedElement(name, false, null); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public RedefinableElement getRedefinedElement(String name, |
| boolean ignoreCase, EClass eClass) { |
| redefinedElementLoop : for (Iterator i = getRedefinedElements() |
| .iterator(); i.hasNext();) { |
| RedefinableElement redefinedElement = (RedefinableElement) i.next(); |
| if (eClass != null && !eClass.isInstance(redefinedElement)) |
| continue redefinedElementLoop; |
| if (name != null && !(ignoreCase |
| ? name.equalsIgnoreCase(redefinedElement.getName()) |
| : name.equals(redefinedElement.getName()))) |
| continue redefinedElementLoop; |
| return redefinedElement; |
| } |
| return null; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EList getRedefinitionContextsGen() { |
| |
| CacheAdapter cache = getCacheAdapter(); |
| if (cache != null) { |
| Resource eResource = eResource(); |
| EList redefinitionContexts = (EList) cache.get(eResource, this, |
| UMLPackage.Literals.REDEFINABLE_ELEMENT__REDEFINITION_CONTEXT); |
| if (redefinitionContexts == null) { |
| cache |
| .put( |
| eResource, |
| this, |
| UMLPackage.Literals.REDEFINABLE_ELEMENT__REDEFINITION_CONTEXT, |
| redefinitionContexts = new DerivedUnionEObjectEList( |
| Classifier.class, |
| this, |
| UMLPackage.BEHAVIORAL_FEATURE__REDEFINITION_CONTEXT, |
| null)); |
| } |
| return redefinitionContexts; |
| } |
| return new DerivedUnionEObjectEList(Classifier.class, this, |
| UMLPackage.BEHAVIORAL_FEATURE__REDEFINITION_CONTEXT, null); |
| } |
| |
| /** |
| * The array of subset feature identifiers for the '{@link #getRedefinitionContexts() <em>Redefinition Context</em>}' reference list. |
| * @see #getRedefinitionContexts() |
| */ |
| protected static final int[] REDEFINITION_CONTEXT_ESUBSETS = new int[]{UMLPackage.BEHAVIORAL_FEATURE__NAMESPACE}; |
| |
| public EList getRedefinitionContexts() { |
| CacheAdapter cache = getCacheAdapter(); |
| if (cache != null) { |
| Resource eResource = eResource(); |
| EList redefinitionContext = (EList) cache.get(eResource, this, |
| UMLPackage.Literals.REDEFINABLE_ELEMENT__REDEFINITION_CONTEXT); |
| if (redefinitionContext == null) { |
| cache |
| .put( |
| eResource, |
| this, |
| UMLPackage.Literals.REDEFINABLE_ELEMENT__REDEFINITION_CONTEXT, |
| redefinitionContext = new DerivedUnionEObjectEList( |
| Classifier.class, |
| this, |
| UMLPackage.BEHAVIORAL_FEATURE__REDEFINITION_CONTEXT, |
| REDEFINITION_CONTEXT_ESUBSETS)); |
| } |
| return redefinitionContext; |
| } |
| return new DerivedUnionEObjectEList(Classifier.class, this, |
| UMLPackage.BEHAVIORAL_FEATURE__REDEFINITION_CONTEXT, |
| REDEFINITION_CONTEXT_ESUBSETS); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Classifier getRedefinitionContext(String name) { |
| return getRedefinitionContext(name, false, null); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Classifier getRedefinitionContext(String name, boolean ignoreCase, |
| EClass eClass) { |
| redefinitionContextLoop : for (Iterator i = getRedefinitionContexts() |
| .iterator(); i.hasNext();) { |
| Classifier redefinitionContext = (Classifier) i.next(); |
| if (eClass != null && !eClass.isInstance(redefinitionContext)) |
| continue redefinitionContextLoop; |
| if (name != null && !(ignoreCase |
| ? name.equalsIgnoreCase(redefinitionContext.getName()) |
| : name.equals(redefinitionContext.getName()))) |
| continue redefinitionContextLoop; |
| return redefinitionContext; |
| } |
| return null; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isLeaf() { |
| return (eFlags & IS_LEAF_EFLAG) != 0; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setIsLeaf(boolean newIsLeaf) { |
| |
| boolean oldIsLeaf = (eFlags & IS_LEAF_EFLAG) != 0; |
| if (newIsLeaf) |
| eFlags |= IS_LEAF_EFLAG; |
| else |
| eFlags &= ~IS_LEAF_EFLAG; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, |
| UMLPackage.BEHAVIORAL_FEATURE__IS_LEAF, oldIsLeaf, newIsLeaf)); |
| |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EList getFeaturingClassifiersGen() { |
| |
| CacheAdapter cache = getCacheAdapter(); |
| if (cache != null) { |
| Resource eResource = eResource(); |
| EList featuringClassifiers = (EList) cache.get(eResource, this, |
| UMLPackage.Literals.FEATURE__FEATURING_CLASSIFIER); |
| if (featuringClassifiers == null) { |
| cache.put(eResource, this, |
| UMLPackage.Literals.FEATURE__FEATURING_CLASSIFIER, |
| featuringClassifiers = new DerivedUnionEObjectEList( |
| Classifier.class, this, |
| UMLPackage.BEHAVIORAL_FEATURE__FEATURING_CLASSIFIER, |
| null)); |
| } |
| return featuringClassifiers; |
| } |
| return new DerivedUnionEObjectEList(Classifier.class, this, |
| UMLPackage.BEHAVIORAL_FEATURE__FEATURING_CLASSIFIER, null); |
| } |
| |
| /** |
| * The array of subset feature identifiers for the '{@link #getFeaturingClassifiers() <em>Featuring Classifier</em>}' reference list. |
| * @see #getFeaturingClassifiers() |
| */ |
| protected static final int[] FEATURING_CLASSIFIER_ESUBSETS = new int[]{UMLPackage.BEHAVIORAL_FEATURE__NAMESPACE}; |
| |
| public EList getFeaturingClassifiers() { |
| CacheAdapter cache = getCacheAdapter(); |
| if (cache != null) { |
| Resource eResource = eResource(); |
| EList featuringClassifiers = (EList) cache.get(eResource, this, |
| UMLPackage.Literals.FEATURE__FEATURING_CLASSIFIER); |
| if (featuringClassifiers == null) { |
| cache.put(eResource, this, |
| UMLPackage.Literals.FEATURE__FEATURING_CLASSIFIER, |
| featuringClassifiers = new DerivedUnionEObjectEList( |
| Classifier.class, this, |
| UMLPackage.BEHAVIORAL_FEATURE__FEATURING_CLASSIFIER, |
| FEATURING_CLASSIFIER_ESUBSETS)); |
| } |
| return featuringClassifiers; |
| } |
| return new DerivedUnionEObjectEList(Classifier.class, this, |
| UMLPackage.BEHAVIORAL_FEATURE__FEATURING_CLASSIFIER, |
| FEATURING_CLASSIFIER_ESUBSETS); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Classifier getFeaturingClassifier(String name) { |
| return getFeaturingClassifier(name, false, null); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Classifier getFeaturingClassifier(String name, boolean ignoreCase, |
| EClass eClass) { |
| featuringClassifierLoop : for (Iterator i = getFeaturingClassifiers() |
| .iterator(); i.hasNext();) { |
| Classifier featuringClassifier = (Classifier) i.next(); |
| if (eClass != null && !eClass.isInstance(featuringClassifier)) |
| continue featuringClassifierLoop; |
| if (name != null && !(ignoreCase |
| ? name.equalsIgnoreCase(featuringClassifier.getName()) |
| : name.equals(featuringClassifier.getName()))) |
| continue featuringClassifierLoop; |
| return featuringClassifier; |
| } |
| return null; |
| } |
| |
| /** |
| * The array of subset feature identifiers for the '{@link #getOwnedMembers() <em>Owned Member</em>}' reference list. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getOwnedMembers() |
| * @generated |
| * @ordered |
| */ |
| protected static final int[] OWNED_MEMBER_ESUBSETS = new int[]{ |
| UMLPackage.BEHAVIORAL_FEATURE__OWNED_RULE, |
| UMLPackage.BEHAVIORAL_FEATURE__OWNED_PARAMETER, |
| UMLPackage.BEHAVIORAL_FEATURE__OWNED_PARAMETER_SET}; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isStatic() { |
| return (eFlags & IS_STATIC_EFLAG) != 0; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setIsStatic(boolean newIsStatic) { |
| |
| boolean oldIsStatic = (eFlags & IS_STATIC_EFLAG) != 0; |
| if (newIsStatic) |
| eFlags |= IS_STATIC_EFLAG; |
| else |
| eFlags &= ~IS_STATIC_EFLAG; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, |
| UMLPackage.BEHAVIORAL_FEATURE__IS_STATIC, oldIsStatic, |
| newIsStatic)); |
| |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EList getOwnedMembers() { |
| |
| CacheAdapter cache = getCacheAdapter(); |
| if (cache != null) { |
| Resource eResource = eResource(); |
| EList ownedMembers = (EList) cache.get(eResource, this, |
| UMLPackage.Literals.NAMESPACE__OWNED_MEMBER); |
| if (ownedMembers == null) { |
| cache.put(eResource, this, |
| UMLPackage.Literals.NAMESPACE__OWNED_MEMBER, |
| ownedMembers = new DerivedUnionEObjectEList( |
| NamedElement.class, this, |
| UMLPackage.BEHAVIORAL_FEATURE__OWNED_MEMBER, |
| OWNED_MEMBER_ESUBSETS)); |
| } |
| return ownedMembers; |
| } |
| return new DerivedUnionEObjectEList(NamedElement.class, this, |
| UMLPackage.BEHAVIORAL_FEATURE__OWNED_MEMBER, OWNED_MEMBER_ESUBSETS); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EList getOwnedParameters() { |
| if (ownedParameters == null) { |
| ownedParameters = new EObjectContainmentEList.Resolving( |
| Parameter.class, this, |
| UMLPackage.BEHAVIORAL_FEATURE__OWNED_PARAMETER); |
| } |
| return ownedParameters; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Parameter createOwnedParameter(String name, Type type) { |
| Parameter newOwnedParameter = (Parameter) create(UMLPackage.Literals.PARAMETER); |
| getOwnedParameters().add(newOwnedParameter); |
| if (name != null) |
| newOwnedParameter.setName(name); |
| if (type != null) |
| newOwnedParameter.setType(type); |
| return newOwnedParameter; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Parameter getOwnedParameter(String name, Type type) { |
| return getOwnedParameter(name, type, false, false); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Parameter getOwnedParameter(String name, Type type, |
| boolean ignoreCase, boolean createOnDemand) { |
| ownedParameterLoop : for (Iterator i = getOwnedParameters().iterator(); i |
| .hasNext();) { |
| Parameter ownedParameter = (Parameter) i.next(); |
| if (name != null && !(ignoreCase |
| ? name.equalsIgnoreCase(ownedParameter.getName()) |
| : name.equals(ownedParameter.getName()))) |
| continue ownedParameterLoop; |
| if (type != null && !type.equals(ownedParameter.getType())) |
| continue ownedParameterLoop; |
| return ownedParameter; |
| } |
| return createOnDemand |
| ? createOwnedParameter(name, type) |
| : null; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isAbstract() { |
| return (eFlags & IS_ABSTRACT_EFLAG) != 0; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setIsAbstract(boolean newIsAbstract) { |
| |
| boolean oldIsAbstract = (eFlags & IS_ABSTRACT_EFLAG) != 0; |
| if (newIsAbstract) |
| eFlags |= IS_ABSTRACT_EFLAG; |
| else |
| eFlags &= ~IS_ABSTRACT_EFLAG; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, |
| UMLPackage.BEHAVIORAL_FEATURE__IS_ABSTRACT, oldIsAbstract, |
| newIsAbstract)); |
| |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EList getMethods() { |
| if (methods == null) { |
| methods = new EObjectWithInverseResolvingEList(Behavior.class, |
| this, UMLPackage.BEHAVIORAL_FEATURE__METHOD, |
| UMLPackage.BEHAVIOR__SPECIFICATION); |
| } |
| return methods; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Behavior getMethod(String name) { |
| return getMethod(name, false, null); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Behavior getMethod(String name, boolean ignoreCase, EClass eClass) { |
| methodLoop : for (Iterator i = getMethods().iterator(); i.hasNext();) { |
| Behavior method = (Behavior) i.next(); |
| if (eClass != null && !eClass.isInstance(method)) |
| continue methodLoop; |
| if (name != null && !(ignoreCase |
| ? name.equalsIgnoreCase(method.getName()) |
| : name.equals(method.getName()))) |
| continue methodLoop; |
| return method; |
| } |
| return null; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public CallConcurrencyKind getConcurrency() { |
| return concurrency; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setConcurrency(CallConcurrencyKind newConcurrency) { |
| |
| CallConcurrencyKind oldConcurrency = concurrency; |
| concurrency = newConcurrency == null |
| ? CONCURRENCY_EDEFAULT |
| : newConcurrency; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, |
| UMLPackage.BEHAVIORAL_FEATURE__CONCURRENCY, oldConcurrency, |
| concurrency)); |
| |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EList getRaisedExceptions() { |
| if (raisedExceptions == null) { |
| raisedExceptions = new EObjectResolvingEList(Type.class, this, |
| UMLPackage.BEHAVIORAL_FEATURE__RAISED_EXCEPTION); |
| } |
| return raisedExceptions; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Type getRaisedException(String name) { |
| return getRaisedException(name, false, null); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Type getRaisedException(String name, boolean ignoreCase, |
| EClass eClass) { |
| raisedExceptionLoop : for (Iterator i = getRaisedExceptions() |
| .iterator(); i.hasNext();) { |
| Type raisedException = (Type) i.next(); |
| if (eClass != null && !eClass.isInstance(raisedException)) |
| continue raisedExceptionLoop; |
| if (name != null && !(ignoreCase |
| ? name.equalsIgnoreCase(raisedException.getName()) |
| : name.equals(raisedException.getName()))) |
| continue raisedExceptionLoop; |
| return raisedException; |
| } |
| return null; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EList getOwnedParameterSets() { |
| if (ownedParameterSets == null) { |
| ownedParameterSets = new EObjectContainmentEList.Resolving( |
| ParameterSet.class, this, |
| UMLPackage.BEHAVIORAL_FEATURE__OWNED_PARAMETER_SET); |
| } |
| return ownedParameterSets; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public ParameterSet createOwnedParameterSet(String name) { |
| ParameterSet newOwnedParameterSet = (ParameterSet) create(UMLPackage.Literals.PARAMETER_SET); |
| getOwnedParameterSets().add(newOwnedParameterSet); |
| if (name != null) |
| newOwnedParameterSet.setName(name); |
| return newOwnedParameterSet; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public ParameterSet getOwnedParameterSet(String name) { |
| return getOwnedParameterSet(name, false, false); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public ParameterSet getOwnedParameterSet(String name, boolean ignoreCase, |
| boolean createOnDemand) { |
| ownedParameterSetLoop : for (Iterator i = getOwnedParameterSets() |
| .iterator(); i.hasNext();) { |
| ParameterSet ownedParameterSet = (ParameterSet) i.next(); |
| if (name != null && !(ignoreCase |
| ? name.equalsIgnoreCase(ownedParameterSet.getName()) |
| : name.equals(ownedParameterSet.getName()))) |
| continue ownedParameterSetLoop; |
| return ownedParameterSet; |
| } |
| return createOnDemand |
| ? createOwnedParameterSet(name) |
| : null; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean validateRedefinitionContextValid( |
| DiagnosticChain diagnostics, Map context) { |
| return RedefinableElementOperations.validateRedefinitionContextValid( |
| this, diagnostics, context); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean validateRedefinitionConsistent(DiagnosticChain diagnostics, |
| Map context) { |
| return RedefinableElementOperations.validateRedefinitionConsistent( |
| this, diagnostics, context); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isRedefinitionContextValid(RedefinableElement redefined) { |
| return RedefinableElementOperations.isRedefinitionContextValid(this, |
| redefined); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Parameter createReturnResult(String name, Type type) { |
| return BehavioralFeatureOperations.createReturnResult(this, name, type); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isConsistentWith(RedefinableElement redefinee) { |
| return RedefinableElementOperations.isConsistentWith(this, redefinee); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isDistinguishableFrom(NamedElement n, Namespace ns) { |
| return BehavioralFeatureOperations.isDistinguishableFrom(this, n, ns); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain eInverseAdd(InternalEObject otherEnd, |
| int featureID, NotificationChain msgs) { |
| switch (featureID) { |
| case UMLPackage.BEHAVIORAL_FEATURE__EANNOTATIONS : |
| return ((InternalEList) getEAnnotations()).basicAdd(otherEnd, |
| msgs); |
| case UMLPackage.BEHAVIORAL_FEATURE__CLIENT_DEPENDENCY : |
| return ((InternalEList) getClientDependencies()).basicAdd( |
| otherEnd, msgs); |
| case UMLPackage.BEHAVIORAL_FEATURE__ELEMENT_IMPORT : |
| return ((InternalEList) getElementImports()).basicAdd(otherEnd, |
| msgs); |
| case UMLPackage.BEHAVIORAL_FEATURE__PACKAGE_IMPORT : |
| return ((InternalEList) getPackageImports()).basicAdd(otherEnd, |
| msgs); |
| case UMLPackage.BEHAVIORAL_FEATURE__OWNED_RULE : |
| return ((InternalEList) getOwnedRules()).basicAdd(otherEnd, |
| msgs); |
| case UMLPackage.BEHAVIORAL_FEATURE__METHOD : |
| return ((InternalEList) getMethods()).basicAdd(otherEnd, msgs); |
| } |
| return eDynamicInverseAdd(otherEnd, featureID, msgs); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain eInverseRemove(InternalEObject otherEnd, |
| int featureID, NotificationChain msgs) { |
| switch (featureID) { |
| case UMLPackage.BEHAVIORAL_FEATURE__EANNOTATIONS : |
| return ((InternalEList) getEAnnotations()).basicRemove( |
| otherEnd, msgs); |
| case UMLPackage.BEHAVIORAL_FEATURE__OWNED_COMMENT : |
| return ((InternalEList) getOwnedComments()).basicRemove( |
| otherEnd, msgs); |
| case UMLPackage.BEHAVIORAL_FEATURE__CLIENT_DEPENDENCY : |
| return ((InternalEList) getClientDependencies()).basicRemove( |
| otherEnd, msgs); |
| case UMLPackage.BEHAVIORAL_FEATURE__NAME_EXPRESSION : |
| return basicSetNameExpression(null, msgs); |
| case UMLPackage.BEHAVIORAL_FEATURE__ELEMENT_IMPORT : |
| return ((InternalEList) getElementImports()).basicRemove( |
| otherEnd, msgs); |
| case UMLPackage.BEHAVIORAL_FEATURE__PACKAGE_IMPORT : |
| return ((InternalEList) getPackageImports()).basicRemove( |
| otherEnd, msgs); |
| case UMLPackage.BEHAVIORAL_FEATURE__OWNED_RULE : |
| return ((InternalEList) getOwnedRules()).basicRemove(otherEnd, |
| msgs); |
| case UMLPackage.BEHAVIORAL_FEATURE__OWNED_PARAMETER : |
| return ((InternalEList) getOwnedParameters()).basicRemove( |
| otherEnd, msgs); |
| case UMLPackage.BEHAVIORAL_FEATURE__METHOD : |
| return ((InternalEList) getMethods()).basicRemove(otherEnd, |
| msgs); |
| case UMLPackage.BEHAVIORAL_FEATURE__OWNED_PARAMETER_SET : |
| return ((InternalEList) getOwnedParameterSets()).basicRemove( |
| otherEnd, msgs); |
| } |
| return eDynamicInverseRemove(otherEnd, featureID, msgs); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case UMLPackage.BEHAVIORAL_FEATURE__EANNOTATIONS : |
| return getEAnnotations(); |
| case UMLPackage.BEHAVIORAL_FEATURE__OWNED_ELEMENT : |
| return getOwnedElements(); |
| case UMLPackage.BEHAVIORAL_FEATURE__OWNER : |
| if (resolve) |
| return getOwner(); |
| return basicGetOwner(); |
| case UMLPackage.BEHAVIORAL_FEATURE__OWNED_COMMENT : |
| return getOwnedComments(); |
| case UMLPackage.BEHAVIORAL_FEATURE__NAME : |
| return getName(); |
| case UMLPackage.BEHAVIORAL_FEATURE__VISIBILITY : |
| return getVisibility(); |
| case UMLPackage.BEHAVIORAL_FEATURE__QUALIFIED_NAME : |
| return getQualifiedName(); |
| case UMLPackage.BEHAVIORAL_FEATURE__CLIENT_DEPENDENCY : |
| return getClientDependencies(); |
| case UMLPackage.BEHAVIORAL_FEATURE__NAMESPACE : |
| if (resolve) |
| return getNamespace(); |
| return basicGetNamespace(); |
| case UMLPackage.BEHAVIORAL_FEATURE__NAME_EXPRESSION : |
| if (resolve) |
| return getNameExpression(); |
| return basicGetNameExpression(); |
| case UMLPackage.BEHAVIORAL_FEATURE__ELEMENT_IMPORT : |
| return getElementImports(); |
| case UMLPackage.BEHAVIORAL_FEATURE__PACKAGE_IMPORT : |
| return getPackageImports(); |
| case UMLPackage.BEHAVIORAL_FEATURE__OWNED_RULE : |
| return getOwnedRules(); |
| case UMLPackage.BEHAVIORAL_FEATURE__MEMBER : |
| return getMembers(); |
| case UMLPackage.BEHAVIORAL_FEATURE__IMPORTED_MEMBER : |
| return getImportedMembers(); |
| case UMLPackage.BEHAVIORAL_FEATURE__OWNED_MEMBER : |
| return getOwnedMembers(); |
| case UMLPackage.BEHAVIORAL_FEATURE__IS_LEAF : |
| return isLeaf() |
| ? Boolean.TRUE |
| : Boolean.FALSE; |
| case UMLPackage.BEHAVIORAL_FEATURE__REDEFINED_ELEMENT : |
| return getRedefinedElements(); |
| case UMLPackage.BEHAVIORAL_FEATURE__REDEFINITION_CONTEXT : |
| return getRedefinitionContexts(); |
| case UMLPackage.BEHAVIORAL_FEATURE__IS_STATIC : |
| return isStatic() |
| ? Boolean.TRUE |
| : Boolean.FALSE; |
| case UMLPackage.BEHAVIORAL_FEATURE__FEATURING_CLASSIFIER : |
| return getFeaturingClassifiers(); |
| case UMLPackage.BEHAVIORAL_FEATURE__OWNED_PARAMETER : |
| return getOwnedParameters(); |
| case UMLPackage.BEHAVIORAL_FEATURE__IS_ABSTRACT : |
| return isAbstract() |
| ? Boolean.TRUE |
| : Boolean.FALSE; |
| case UMLPackage.BEHAVIORAL_FEATURE__METHOD : |
| return getMethods(); |
| case UMLPackage.BEHAVIORAL_FEATURE__CONCURRENCY : |
| return getConcurrency(); |
| case UMLPackage.BEHAVIORAL_FEATURE__RAISED_EXCEPTION : |
| return getRaisedExceptions(); |
| case UMLPackage.BEHAVIORAL_FEATURE__OWNED_PARAMETER_SET : |
| return getOwnedParameterSets(); |
| } |
| return eDynamicGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case UMLPackage.BEHAVIORAL_FEATURE__EANNOTATIONS : |
| getEAnnotations().clear(); |
| getEAnnotations().addAll((Collection) newValue); |
| return; |
| case UMLPackage.BEHAVIORAL_FEATURE__OWNED_COMMENT : |
| getOwnedComments().clear(); |
| getOwnedComments().addAll((Collection) newValue); |
| return; |
| case UMLPackage.BEHAVIORAL_FEATURE__NAME : |
| setName((String) newValue); |
| return; |
| case UMLPackage.BEHAVIORAL_FEATURE__VISIBILITY : |
| setVisibility((VisibilityKind) newValue); |
| return; |
| case UMLPackage.BEHAVIORAL_FEATURE__CLIENT_DEPENDENCY : |
| getClientDependencies().clear(); |
| getClientDependencies().addAll((Collection) newValue); |
| return; |
| case UMLPackage.BEHAVIORAL_FEATURE__NAME_EXPRESSION : |
| setNameExpression((StringExpression) newValue); |
| return; |
| case UMLPackage.BEHAVIORAL_FEATURE__ELEMENT_IMPORT : |
| getElementImports().clear(); |
| getElementImports().addAll((Collection) newValue); |
| return; |
| case UMLPackage.BEHAVIORAL_FEATURE__PACKAGE_IMPORT : |
| getPackageImports().clear(); |
| getPackageImports().addAll((Collection) newValue); |
| return; |
| case UMLPackage.BEHAVIORAL_FEATURE__OWNED_RULE : |
| getOwnedRules().clear(); |
| getOwnedRules().addAll((Collection) newValue); |
| return; |
| case UMLPackage.BEHAVIORAL_FEATURE__IS_LEAF : |
| setIsLeaf(((Boolean) newValue).booleanValue()); |
| return; |
| case UMLPackage.BEHAVIORAL_FEATURE__IS_STATIC : |
| setIsStatic(((Boolean) newValue).booleanValue()); |
| return; |
| case UMLPackage.BEHAVIORAL_FEATURE__OWNED_PARAMETER : |
| getOwnedParameters().clear(); |
| getOwnedParameters().addAll((Collection) newValue); |
| return; |
| case UMLPackage.BEHAVIORAL_FEATURE__IS_ABSTRACT : |
| setIsAbstract(((Boolean) newValue).booleanValue()); |
| return; |
| case UMLPackage.BEHAVIORAL_FEATURE__METHOD : |
| getMethods().clear(); |
| getMethods().addAll((Collection) newValue); |
| return; |
| case UMLPackage.BEHAVIORAL_FEATURE__CONCURRENCY : |
| setConcurrency((CallConcurrencyKind) newValue); |
| return; |
| case UMLPackage.BEHAVIORAL_FEATURE__RAISED_EXCEPTION : |
| getRaisedExceptions().clear(); |
| getRaisedExceptions().addAll((Collection) newValue); |
| return; |
| case UMLPackage.BEHAVIORAL_FEATURE__OWNED_PARAMETER_SET : |
| getOwnedParameterSets().clear(); |
| getOwnedParameterSets().addAll((Collection) newValue); |
| return; |
| } |
| eDynamicSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case UMLPackage.BEHAVIORAL_FEATURE__EANNOTATIONS : |
| getEAnnotations().clear(); |
| return; |
| case UMLPackage.BEHAVIORAL_FEATURE__OWNED_COMMENT : |
| getOwnedComments().clear(); |
| return; |
| case UMLPackage.BEHAVIORAL_FEATURE__NAME : |
| unsetName(); |
| return; |
| case UMLPackage.BEHAVIORAL_FEATURE__VISIBILITY : |
| unsetVisibility(); |
| return; |
| case UMLPackage.BEHAVIORAL_FEATURE__CLIENT_DEPENDENCY : |
| getClientDependencies().clear(); |
| return; |
| case UMLPackage.BEHAVIORAL_FEATURE__NAME_EXPRESSION : |
| setNameExpression((StringExpression) null); |
| return; |
| case UMLPackage.BEHAVIORAL_FEATURE__ELEMENT_IMPORT : |
| getElementImports().clear(); |
| return; |
| case UMLPackage.BEHAVIORAL_FEATURE__PACKAGE_IMPORT : |
| getPackageImports().clear(); |
| return; |
| case UMLPackage.BEHAVIORAL_FEATURE__OWNED_RULE : |
| getOwnedRules().clear(); |
| return; |
| case UMLPackage.BEHAVIORAL_FEATURE__IS_LEAF : |
| setIsLeaf(IS_LEAF_EDEFAULT); |
| return; |
| case UMLPackage.BEHAVIORAL_FEATURE__IS_STATIC : |
| setIsStatic(IS_STATIC_EDEFAULT); |
| return; |
| case UMLPackage.BEHAVIORAL_FEATURE__OWNED_PARAMETER : |
| getOwnedParameters().clear(); |
| return; |
| case UMLPackage.BEHAVIORAL_FEATURE__IS_ABSTRACT : |
| setIsAbstract(IS_ABSTRACT_EDEFAULT); |
| return; |
| case UMLPackage.BEHAVIORAL_FEATURE__METHOD : |
| getMethods().clear(); |
| return; |
| case UMLPackage.BEHAVIORAL_FEATURE__CONCURRENCY : |
| setConcurrency(CONCURRENCY_EDEFAULT); |
| return; |
| case UMLPackage.BEHAVIORAL_FEATURE__RAISED_EXCEPTION : |
| getRaisedExceptions().clear(); |
| return; |
| case UMLPackage.BEHAVIORAL_FEATURE__OWNED_PARAMETER_SET : |
| getOwnedParameterSets().clear(); |
| return; |
| } |
| eDynamicUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case UMLPackage.BEHAVIORAL_FEATURE__EANNOTATIONS : |
| return eAnnotations != null && !eAnnotations.isEmpty(); |
| case UMLPackage.BEHAVIORAL_FEATURE__OWNED_ELEMENT : |
| return isSetOwnedElements(); |
| case UMLPackage.BEHAVIORAL_FEATURE__OWNER : |
| return isSetOwner(); |
| case UMLPackage.BEHAVIORAL_FEATURE__OWNED_COMMENT : |
| return ownedComments != null && !ownedComments.isEmpty(); |
| case UMLPackage.BEHAVIORAL_FEATURE__NAME : |
| return isSetName(); |
| case UMLPackage.BEHAVIORAL_FEATURE__VISIBILITY : |
| return isSetVisibility(); |
| case UMLPackage.BEHAVIORAL_FEATURE__QUALIFIED_NAME : |
| return QUALIFIED_NAME_EDEFAULT == null |
| ? getQualifiedName() != null |
| : !QUALIFIED_NAME_EDEFAULT.equals(getQualifiedName()); |
| case UMLPackage.BEHAVIORAL_FEATURE__CLIENT_DEPENDENCY : |
| return clientDependencies != null |
| && !clientDependencies.isEmpty(); |
| case UMLPackage.BEHAVIORAL_FEATURE__NAMESPACE : |
| return isSetNamespace(); |
| case UMLPackage.BEHAVIORAL_FEATURE__NAME_EXPRESSION : |
| return nameExpression != null; |
| case UMLPackage.BEHAVIORAL_FEATURE__ELEMENT_IMPORT : |
| return elementImports != null && !elementImports.isEmpty(); |
| case UMLPackage.BEHAVIORAL_FEATURE__PACKAGE_IMPORT : |
| return packageImports != null && !packageImports.isEmpty(); |
| case UMLPackage.BEHAVIORAL_FEATURE__OWNED_RULE : |
| return ownedRules != null && !ownedRules.isEmpty(); |
| case UMLPackage.BEHAVIORAL_FEATURE__MEMBER : |
| return isSetMembers(); |
| case UMLPackage.BEHAVIORAL_FEATURE__IMPORTED_MEMBER : |
| return !getImportedMembers().isEmpty(); |
| case UMLPackage.BEHAVIORAL_FEATURE__OWNED_MEMBER : |
| return isSetOwnedMembers(); |
| case UMLPackage.BEHAVIORAL_FEATURE__IS_LEAF : |
| return ((eFlags & IS_LEAF_EFLAG) != 0) != IS_LEAF_EDEFAULT; |
| case UMLPackage.BEHAVIORAL_FEATURE__REDEFINED_ELEMENT : |
| return isSetRedefinedElements(); |
| case UMLPackage.BEHAVIORAL_FEATURE__REDEFINITION_CONTEXT : |
| return isSetRedefinitionContexts(); |
| case UMLPackage.BEHAVIORAL_FEATURE__IS_STATIC : |
| return ((eFlags & IS_STATIC_EFLAG) != 0) != IS_STATIC_EDEFAULT; |
| case UMLPackage.BEHAVIORAL_FEATURE__FEATURING_CLASSIFIER : |
| return isSetFeaturingClassifiers(); |
| case UMLPackage.BEHAVIORAL_FEATURE__OWNED_PARAMETER : |
| return ownedParameters != null && !ownedParameters.isEmpty(); |
| case UMLPackage.BEHAVIORAL_FEATURE__IS_ABSTRACT : |
| return ((eFlags & IS_ABSTRACT_EFLAG) != 0) != IS_ABSTRACT_EDEFAULT; |
| case UMLPackage.BEHAVIORAL_FEATURE__METHOD : |
| return methods != null && !methods.isEmpty(); |
| case UMLPackage.BEHAVIORAL_FEATURE__CONCURRENCY : |
| return concurrency != CONCURRENCY_EDEFAULT; |
| case UMLPackage.BEHAVIORAL_FEATURE__RAISED_EXCEPTION : |
| return raisedExceptions != null && !raisedExceptions.isEmpty(); |
| case UMLPackage.BEHAVIORAL_FEATURE__OWNED_PARAMETER_SET : |
| return ownedParameterSets != null |
| && !ownedParameterSets.isEmpty(); |
| } |
| return eDynamicIsSet(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { |
| if (baseClass == RedefinableElement.class) { |
| switch (derivedFeatureID) { |
| case UMLPackage.BEHAVIORAL_FEATURE__IS_LEAF : |
| return UMLPackage.REDEFINABLE_ELEMENT__IS_LEAF; |
| case UMLPackage.BEHAVIORAL_FEATURE__REDEFINED_ELEMENT : |
| return UMLPackage.REDEFINABLE_ELEMENT__REDEFINED_ELEMENT; |
| case UMLPackage.BEHAVIORAL_FEATURE__REDEFINITION_CONTEXT : |
| return UMLPackage.REDEFINABLE_ELEMENT__REDEFINITION_CONTEXT; |
| default : |
| return -1; |
| } |
| } |
| if (baseClass == Feature.class) { |
| switch (derivedFeatureID) { |
| case UMLPackage.BEHAVIORAL_FEATURE__IS_STATIC : |
| return UMLPackage.FEATURE__IS_STATIC; |
| case UMLPackage.BEHAVIORAL_FEATURE__FEATURING_CLASSIFIER : |
| return UMLPackage.FEATURE__FEATURING_CLASSIFIER; |
| default : |
| return -1; |
| } |
| } |
| return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { |
| if (baseClass == RedefinableElement.class) { |
| switch (baseFeatureID) { |
| case UMLPackage.REDEFINABLE_ELEMENT__IS_LEAF : |
| return UMLPackage.BEHAVIORAL_FEATURE__IS_LEAF; |
| case UMLPackage.REDEFINABLE_ELEMENT__REDEFINED_ELEMENT : |
| return UMLPackage.BEHAVIORAL_FEATURE__REDEFINED_ELEMENT; |
| case UMLPackage.REDEFINABLE_ELEMENT__REDEFINITION_CONTEXT : |
| return UMLPackage.BEHAVIORAL_FEATURE__REDEFINITION_CONTEXT; |
| default : |
| return -1; |
| } |
| } |
| if (baseClass == Feature.class) { |
| switch (baseFeatureID) { |
| case UMLPackage.FEATURE__IS_STATIC : |
| return UMLPackage.BEHAVIORAL_FEATURE__IS_STATIC; |
| case UMLPackage.FEATURE__FEATURING_CLASSIFIER : |
| return UMLPackage.BEHAVIORAL_FEATURE__FEATURING_CLASSIFIER; |
| default : |
| return -1; |
| } |
| } |
| return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String toString() { |
| if (eIsProxy()) |
| return super.toString(); |
| |
| StringBuffer result = new StringBuffer(super.toString()); |
| result.append(" (isLeaf: "); //$NON-NLS-1$ |
| result.append((eFlags & IS_LEAF_EFLAG) != 0); |
| result.append(", isStatic: "); //$NON-NLS-1$ |
| result.append((eFlags & IS_STATIC_EFLAG) != 0); |
| result.append(", isAbstract: "); //$NON-NLS-1$ |
| result.append((eFlags & IS_ABSTRACT_EFLAG) != 0); |
| result.append(", concurrency: "); //$NON-NLS-1$ |
| result.append(concurrency); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isSetRedefinedElements() { |
| return false; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isSetRedefinitionContextsGen() { |
| return false; |
| } |
| |
| public boolean isSetRedefinitionContexts() { |
| return basicGetNamespace() instanceof Classifier; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isSetFeaturingClassifiersGen() { |
| return false; |
| } |
| |
| public boolean isSetFeaturingClassifiers() { |
| return basicGetNamespace() instanceof Classifier; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isSetOwnedMembers() { |
| return super.isSetOwnedMembers() |
| || eIsSet(UMLPackage.BEHAVIORAL_FEATURE__OWNED_PARAMETER) |
| || eIsSet(UMLPackage.BEHAVIORAL_FEATURE__OWNED_PARAMETER_SET); |
| } |
| |
| } //BehavioralFeatureImpl |