| /* |
| * 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: ClassifierImpl.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.EObjectContainmentEList; |
| import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; |
| import org.eclipse.emf.ecore.util.EObjectResolvingEList; |
| import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; |
| 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.SubsetEObjectContainmentWithInverseEList; |
| import org.eclipse.uml2.common.util.SupersetEObjectContainmentEList; |
| import org.eclipse.uml2.common.util.SupersetEObjectWithInverseResolvingEList; |
| |
| import org.eclipse.uml2.uml.Classifier; |
| import org.eclipse.uml2.uml.ClassifierTemplateParameter; |
| import org.eclipse.uml2.uml.CollaborationUse; |
| import org.eclipse.uml2.uml.Dependency; |
| import org.eclipse.uml2.uml.Element; |
| import org.eclipse.uml2.uml.Feature; |
| import org.eclipse.uml2.uml.Generalization; |
| import org.eclipse.uml2.uml.GeneralizationSet; |
| import org.eclipse.uml2.uml.NamedElement; |
| import org.eclipse.uml2.uml.Namespace; |
| import org.eclipse.uml2.uml.PackageableElement; |
| import org.eclipse.uml2.uml.ParameterableElement; |
| import org.eclipse.uml2.uml.Property; |
| import org.eclipse.uml2.uml.RedefinableElement; |
| import org.eclipse.uml2.uml.RedefinableTemplateSignature; |
| import org.eclipse.uml2.uml.StringExpression; |
| import org.eclipse.uml2.uml.Substitution; |
| 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.UseCase; |
| import org.eclipse.uml2.uml.VisibilityKind; |
| |
| import org.eclipse.uml2.uml.internal.operations.ClassifierOperations; |
| import org.eclipse.uml2.uml.internal.operations.ParameterableElementOperations; |
| import org.eclipse.uml2.uml.internal.operations.RedefinableElementOperations; |
| import org.eclipse.uml2.uml.internal.operations.TemplateableElementOperations; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Classifier</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * <ul> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.ClassifierImpl#getRedefinedElements <em>Redefined Element</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.ClassifierImpl#getRedefinitionContexts <em>Redefinition Context</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.ClassifierImpl#isLeaf <em>Is Leaf</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.ClassifierImpl#getTemplateParameter <em>Template Parameter</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.ClassifierImpl#getOwningTemplateParameter <em>Owning Template Parameter</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.ClassifierImpl#getVisibility <em>Visibility</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.ClassifierImpl#getPackage <em>Package</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.ClassifierImpl#getOwnedElements <em>Owned Element</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.ClassifierImpl#getTemplateBindings <em>Template Binding</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.ClassifierImpl#getOwnedTemplateSignature <em>Owned Template Signature</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.ClassifierImpl#getFeatures <em>Feature</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.ClassifierImpl#getMembers <em>Member</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.ClassifierImpl#getOwnedMembers <em>Owned Member</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.ClassifierImpl#getAttributes <em>Attribute</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.ClassifierImpl#getClientDependencies <em>Client Dependency</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.ClassifierImpl#getCollaborationUses <em>Collaboration Use</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.ClassifierImpl#isAbstract <em>Is Abstract</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.ClassifierImpl#getGeneralizations <em>Generalization</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.ClassifierImpl#getPowertypeExtents <em>Powertype Extent</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.ClassifierImpl#getInheritedMembers <em>Inherited Member</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.ClassifierImpl#getRedefinedClassifiers <em>Redefined Classifier</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.ClassifierImpl#getGenerals <em>General</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.ClassifierImpl#getOwnedUseCases <em>Owned Use Case</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.ClassifierImpl#getUseCases <em>Use Case</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.ClassifierImpl#getSubstitutions <em>Substitution</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.ClassifierImpl#getRepresentation <em>Representation</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.ClassifierImpl#getOwnedSignature <em>Owned Signature</em>}</li> |
| * </ul> |
| * </p> |
| * |
| * @generated |
| */ |
| public abstract class ClassifierImpl |
| extends NamespaceImpl |
| implements Classifier { |
| |
| /** |
| * 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 #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 << 8; |
| |
| /** |
| * 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 << 9; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected ClassifierImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected EClass eStaticClass() { |
| return UMLPackage.eINSTANCE.getClassifier(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public List getRedefinedElements() { |
| List redefinedElement = (List) eVirtualGet(UMLPackage.CLASSIFIER__REDEFINED_ELEMENT); |
| if (redefinedElement == null) { |
| eVirtualSet(UMLPackage.CLASSIFIER__REDEFINED_ELEMENT, |
| redefinedElement = new DerivedUnionEObjectEList( |
| RedefinableElement.class, this, |
| UMLPackage.CLASSIFIER__REDEFINED_ELEMENT, |
| new EStructuralFeature[]{UMLPackage.eINSTANCE |
| .getClassifier_RedefinedClassifier()})); |
| } |
| return redefinedElement; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public RedefinableElement getRedefinedElement(String name) { |
| for (Iterator i = getRedefinedElements().iterator(); i.hasNext();) { |
| RedefinableElement redefinedElement = (RedefinableElement) i.next(); |
| if (name.equals(redefinedElement.getName())) { |
| return redefinedElement; |
| } |
| } |
| return null; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public List getRedefinitionContexts() { |
| List redefinitionContext = (List) eVirtualGet(UMLPackage.CLASSIFIER__REDEFINITION_CONTEXT); |
| if (redefinitionContext == null) { |
| eVirtualSet(UMLPackage.CLASSIFIER__REDEFINITION_CONTEXT, |
| redefinitionContext = new DerivedUnionEObjectEList( |
| Classifier.class, this, |
| UMLPackage.CLASSIFIER__REDEFINITION_CONTEXT, |
| new EStructuralFeature[]{})); |
| } |
| return redefinitionContext; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Classifier getRedefinitionContext(String name) { |
| for (Iterator i = getRedefinitionContexts().iterator(); i.hasNext();) { |
| Classifier redefinitionContext = (Classifier) i.next(); |
| if (name.equals(redefinitionContext.getName())) { |
| 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.CLASSIFIER__IS_LEAF, oldIsLeaf, newIsLeaf)); |
| |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public TemplateParameter getTemplateParameter() { |
| TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.CLASSIFIER__TEMPLATE_PARAMETER); |
| if (templateParameter != null && templateParameter.eIsProxy()) { |
| TemplateParameter oldTemplateParameter = templateParameter; |
| templateParameter = (TemplateParameter) eResolveProxy((InternalEObject) templateParameter); |
| if (templateParameter != oldTemplateParameter) { |
| eVirtualSet(UMLPackage.CLASSIFIER__TEMPLATE_PARAMETER, |
| templateParameter); |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, |
| UMLPackage.CLASSIFIER__TEMPLATE_PARAMETER, |
| oldTemplateParameter, templateParameter)); |
| } |
| } |
| return templateParameter; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public TemplateParameter basicGetTemplateParameter() { |
| return (TemplateParameter) eVirtualGet(UMLPackage.CLASSIFIER__TEMPLATE_PARAMETER); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetTemplateParameter( |
| TemplateParameter newTemplateParameter, NotificationChain msgs) { |
| Object oldTemplateParameter = eVirtualSet( |
| UMLPackage.CLASSIFIER__TEMPLATE_PARAMETER, newTemplateParameter); |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, |
| Notification.SET, UMLPackage.CLASSIFIER__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.CLASSIFIER__TEMPLATE_PARAMETER); |
| if (newTemplateParameter != templateParameter) { |
| NotificationChain msgs = null; |
| if (templateParameter != null) |
| msgs = ((InternalEObject) templateParameter) |
| .eInverseRemove( |
| this, |
| UMLPackage.CLASSIFIER_TEMPLATE_PARAMETER__PARAMETERED_ELEMENT, |
| ClassifierTemplateParameter.class, msgs); |
| if (newTemplateParameter != null) |
| msgs = ((InternalEObject) newTemplateParameter) |
| .eInverseAdd( |
| this, |
| UMLPackage.CLASSIFIER_TEMPLATE_PARAMETER__PARAMETERED_ELEMENT, |
| ClassifierTemplateParameter.class, msgs); |
| msgs = basicSetTemplateParameter(newTemplateParameter, msgs); |
| if (msgs != null) |
| msgs.dispatch(); |
| } else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, |
| UMLPackage.CLASSIFIER__TEMPLATE_PARAMETER, |
| newTemplateParameter, newTemplateParameter)); |
| |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isSetTemplateParameter() { |
| return eVirtualGet(UMLPackage.CLASSIFIER__TEMPLATE_PARAMETER) != null; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public TemplateParameter getOwningTemplateParameter() { |
| if (eContainerFeatureID != UMLPackage.CLASSIFIER__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.CLASSIFIER__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.CLASSIFIER__OWNING_TEMPLATE_PARAMETER, msgs); |
| if (msgs != null) |
| msgs.dispatch(); |
| } else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, |
| UMLPackage.CLASSIFIER__OWNING_TEMPLATE_PARAMETER, |
| newOwningTemplateParameter, newOwningTemplateParameter)); |
| |
| if (newOwningTemplateParameter != null |
| || oldOwningTemplateParameter == eVirtualGet(UMLPackage.CLASSIFIER__TEMPLATE_PARAMETER)) { |
| setTemplateParameter(newOwningTemplateParameter); |
| } |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public VisibilityKind getVisibility() { |
| VisibilityKind visibility = (VisibilityKind) eVirtualGet(UMLPackage.CLASSIFIER__VISIBILITY); |
| return visibility == null |
| ? VISIBILITY_EDEFAULT |
| : visibility; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setVisibility(VisibilityKind newVisibility) { |
| VisibilityKind visibility = newVisibility == null |
| ? VISIBILITY_EDEFAULT |
| : newVisibility; |
| Object oldVisibility = eVirtualSet(UMLPackage.CLASSIFIER__VISIBILITY, |
| visibility); |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, |
| UMLPackage.CLASSIFIER__VISIBILITY, |
| oldVisibility == EVIRTUAL_NO_VALUE |
| ? VISIBILITY_EDEFAULT |
| : oldVisibility, visibility)); |
| |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isSetVisibility() { |
| return eVirtualIsSet(UMLPackage.CLASSIFIER__VISIBILITY) |
| && eVirtualGet(UMLPackage.CLASSIFIER__VISIBILITY) != VISIBILITY_EDEFAULT; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public org.eclipse.uml2.uml.Package getPackage() { |
| // TODO: implement this method to return the 'Package' reference |
| // Ensure that you remove @generated or mark it @generated NOT |
| throw new UnsupportedOperationException(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setPackage(org.eclipse.uml2.uml.Package newPackage) { |
| // TODO: implement this method to set the 'Package' reference |
| // Ensure that you remove @generated or mark it @generated NOT |
| throw new UnsupportedOperationException(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public List getOwnedElements() { |
| List ownedElement = (List) eVirtualGet(UMLPackage.CLASSIFIER__OWNED_ELEMENT); |
| if (ownedElement == null) { |
| eVirtualSet(UMLPackage.CLASSIFIER__OWNED_ELEMENT, |
| ownedElement = new DerivedUnionEObjectEList(Element.class, |
| this, UMLPackage.CLASSIFIER__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(), |
| UMLPackage.eINSTANCE.getClassifier_Generalization(), |
| UMLPackage.eINSTANCE.getClassifier_Substitution(), |
| UMLPackage.eINSTANCE.getClassifier_CollaborationUse(), |
| UMLPackage.eINSTANCE.getClassifier_OwnedSignature()})); |
| } |
| return ownedElement; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public List getTemplateBindings() { |
| List templateBinding = (List) eVirtualGet(UMLPackage.CLASSIFIER__TEMPLATE_BINDING); |
| if (templateBinding == null) { |
| eVirtualSet(UMLPackage.CLASSIFIER__TEMPLATE_BINDING, |
| templateBinding = new EObjectContainmentWithInverseEList( |
| TemplateBinding.class, this, |
| UMLPackage.CLASSIFIER__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.CLASSIFIER__OWNED_TEMPLATE_SIGNATURE); |
| return ownedTemplateSignature; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetOwnedTemplateSignature( |
| TemplateSignature newOwnedTemplateSignature, NotificationChain msgs) { |
| Object oldOwnedTemplateSignature = eVirtualSet( |
| UMLPackage.CLASSIFIER__OWNED_TEMPLATE_SIGNATURE, |
| newOwnedTemplateSignature); |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, |
| Notification.SET, |
| UMLPackage.CLASSIFIER__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.CLASSIFIER__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.CLASSIFIER__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 getFeatures() { |
| List feature = (List) eVirtualGet(UMLPackage.CLASSIFIER__FEATURE); |
| if (feature == null) { |
| eVirtualSet(UMLPackage.CLASSIFIER__FEATURE, |
| feature = new DerivedUnionEObjectEList(Feature.class, this, |
| UMLPackage.CLASSIFIER__FEATURE, |
| new EStructuralFeature[]{UMLPackage.eINSTANCE |
| .getClassifier_Attribute()})); |
| } |
| return feature; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Feature getFeature(String name) { |
| for (Iterator i = getFeatures().iterator(); i.hasNext();) { |
| Feature feature = (Feature) i.next(); |
| if (name.equals(feature.getName())) { |
| return feature; |
| } |
| } |
| return null; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public List getMembers() { |
| List member = (List) eVirtualGet(UMLPackage.CLASSIFIER__MEMBER); |
| if (member == null) { |
| eVirtualSet(UMLPackage.CLASSIFIER__MEMBER, |
| member = new DerivedUnionEObjectEList(NamedElement.class, this, |
| UMLPackage.CLASSIFIER__MEMBER, new EStructuralFeature[]{ |
| UMLPackage.eINSTANCE.getNamespace_ImportedMember(), |
| UMLPackage.eINSTANCE.getNamespace_OwnedMember(), |
| UMLPackage.eINSTANCE.getClassifier_Feature(), |
| UMLPackage.eINSTANCE.getClassifier_InheritedMember()})); |
| } |
| return member; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public List getOwnedMembers() { |
| List ownedMember = (List) eVirtualGet(UMLPackage.CLASSIFIER__OWNED_MEMBER); |
| if (ownedMember == null) { |
| eVirtualSet(UMLPackage.CLASSIFIER__OWNED_MEMBER, |
| ownedMember = new DerivedUnionEObjectEList(NamedElement.class, |
| this, UMLPackage.CLASSIFIER__OWNED_MEMBER, |
| new EStructuralFeature[]{ |
| UMLPackage.eINSTANCE.getNamespace_OwnedRule(), |
| UMLPackage.eINSTANCE.getClassifier_OwnedUseCase()})); |
| } |
| return ownedMember; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public List getAttributes() { |
| List attribute = (List) eVirtualGet(UMLPackage.CLASSIFIER__ATTRIBUTE); |
| if (attribute == null) { |
| eVirtualSet(UMLPackage.CLASSIFIER__ATTRIBUTE, |
| attribute = new DerivedUnionEObjectEList(Property.class, this, |
| UMLPackage.CLASSIFIER__ATTRIBUTE, |
| new EStructuralFeature[]{})); |
| } |
| return attribute; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Property getAttribute(String name) { |
| for (Iterator i = getAttributes().iterator(); i.hasNext();) { |
| Property attribute = (Property) i.next(); |
| if (name.equals(attribute.getName())) { |
| return attribute; |
| } |
| } |
| return null; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public List getClientDependencies() { |
| List clientDependency = (List) eVirtualGet(UMLPackage.CLASSIFIER__CLIENT_DEPENDENCY); |
| if (clientDependency == null) { |
| eVirtualSet( |
| UMLPackage.CLASSIFIER__CLIENT_DEPENDENCY, |
| clientDependency = new SupersetEObjectWithInverseResolvingEList.ManyInverse( |
| Dependency.class, this, |
| UMLPackage.CLASSIFIER__CLIENT_DEPENDENCY, |
| new int[]{UMLPackage.CLASSIFIER__SUBSTITUTION}, |
| UMLPackage.DEPENDENCY__CLIENT)); |
| } |
| return clientDependency; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public List getCollaborationUses() { |
| List collaborationUse = (List) eVirtualGet(UMLPackage.CLASSIFIER__COLLABORATION_USE); |
| if (collaborationUse == null) { |
| eVirtualSet(UMLPackage.CLASSIFIER__COLLABORATION_USE, |
| collaborationUse = new SupersetEObjectContainmentEList( |
| CollaborationUse.class, this, |
| UMLPackage.CLASSIFIER__COLLABORATION_USE, |
| new int[]{UMLPackage.CLASSIFIER__REPRESENTATION})); |
| } |
| return collaborationUse; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public CollaborationUse createCollaborationUse() { |
| CollaborationUse newCollaborationUse = UMLFactory.eINSTANCE |
| .createCollaborationUse(); |
| getCollaborationUses().add(newCollaborationUse); |
| return newCollaborationUse; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public CollaborationUse getCollaborationUse(String name) { |
| for (Iterator i = getCollaborationUses().iterator(); i.hasNext();) { |
| CollaborationUse collaborationUse = (CollaborationUse) i.next(); |
| if (name.equals(collaborationUse.getName())) { |
| return collaborationUse; |
| } |
| } |
| return 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.CLASSIFIER__IS_ABSTRACT, oldIsAbstract, |
| newIsAbstract)); |
| |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public List getGeneralizations() { |
| List generalization = (List) eVirtualGet(UMLPackage.CLASSIFIER__GENERALIZATION); |
| if (generalization == null) { |
| eVirtualSet(UMLPackage.CLASSIFIER__GENERALIZATION, |
| generalization = new EObjectContainmentWithInverseEList( |
| Generalization.class, this, |
| UMLPackage.CLASSIFIER__GENERALIZATION, |
| UMLPackage.GENERALIZATION__SPECIFIC)); |
| } |
| return generalization; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Generalization createGeneralization() { |
| Generalization newGeneralization = UMLFactory.eINSTANCE |
| .createGeneralization(); |
| getGeneralizations().add(newGeneralization); |
| return newGeneralization; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public List getPowertypeExtents() { |
| List powertypeExtent = (List) eVirtualGet(UMLPackage.CLASSIFIER__POWERTYPE_EXTENT); |
| if (powertypeExtent == null) { |
| eVirtualSet(UMLPackage.CLASSIFIER__POWERTYPE_EXTENT, |
| powertypeExtent = new EObjectWithInverseResolvingEList( |
| GeneralizationSet.class, this, |
| UMLPackage.CLASSIFIER__POWERTYPE_EXTENT, |
| UMLPackage.GENERALIZATION_SET__POWERTYPE)); |
| } |
| return powertypeExtent; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public GeneralizationSet getPowertypeExtent(String name) { |
| for (Iterator i = getPowertypeExtents().iterator(); i.hasNext();) { |
| GeneralizationSet powertypeExtent = (GeneralizationSet) i.next(); |
| if (name.equals(powertypeExtent.getName())) { |
| return powertypeExtent; |
| } |
| } |
| return null; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public List getInheritedMembers() { |
| CacheAdapter cache = getCacheAdapter(); |
| if (cache != null) { |
| List result = (List) cache.get(this, UMLPackage.eINSTANCE |
| .getClassifier_InheritedMember()); |
| if (result == null) { |
| cache.put(this, UMLPackage.eINSTANCE |
| .getClassifier_InheritedMember(), |
| result = ClassifierOperations.getInheritedMembers(this)); |
| } |
| return result; |
| } |
| return ClassifierOperations.getInheritedMembers(this); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NamedElement getInheritedMember(String name) { |
| for (Iterator i = getInheritedMembers().iterator(); i.hasNext();) { |
| NamedElement inheritedMember = (NamedElement) i.next(); |
| if (name.equals(inheritedMember.getName())) { |
| return inheritedMember; |
| } |
| } |
| return null; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public List getRedefinedClassifiers() { |
| List redefinedClassifier = (List) eVirtualGet(UMLPackage.CLASSIFIER__REDEFINED_CLASSIFIER); |
| if (redefinedClassifier == null) { |
| eVirtualSet(UMLPackage.CLASSIFIER__REDEFINED_CLASSIFIER, |
| redefinedClassifier = new EObjectResolvingEList( |
| Classifier.class, this, |
| UMLPackage.CLASSIFIER__REDEFINED_CLASSIFIER)); |
| } |
| return redefinedClassifier; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Classifier getRedefinedClassifier(String name) { |
| for (Iterator i = getRedefinedClassifiers().iterator(); i.hasNext();) { |
| Classifier redefinedClassifier = (Classifier) i.next(); |
| if (name.equals(redefinedClassifier.getName())) { |
| return redefinedClassifier; |
| } |
| } |
| return null; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public List getGenerals() { |
| CacheAdapter cache = getCacheAdapter(); |
| if (cache != null) { |
| List result = (List) cache.get(eResource(), this, |
| UMLPackage.eINSTANCE.getClassifier_General()); |
| if (result == null) { |
| cache.put(eResource(), this, UMLPackage.eINSTANCE |
| .getClassifier_General(), result = ClassifierOperations |
| .getGenerals(this)); |
| } |
| return result; |
| } |
| return ClassifierOperations.getGenerals(this); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Classifier getGeneral(String name) { |
| for (Iterator i = getGenerals().iterator(); i.hasNext();) { |
| Classifier general = (Classifier) i.next(); |
| if (name.equals(general.getName())) { |
| return general; |
| } |
| } |
| return null; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public List getOwnedUseCases() { |
| List ownedUseCase = (List) eVirtualGet(UMLPackage.CLASSIFIER__OWNED_USE_CASE); |
| if (ownedUseCase == null) { |
| eVirtualSet(UMLPackage.CLASSIFIER__OWNED_USE_CASE, |
| ownedUseCase = new EObjectContainmentEList(UseCase.class, this, |
| UMLPackage.CLASSIFIER__OWNED_USE_CASE)); |
| } |
| return ownedUseCase; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public UseCase createOwnedUseCase() { |
| UseCase newOwnedUseCase = UMLFactory.eINSTANCE.createUseCase(); |
| getOwnedUseCases().add(newOwnedUseCase); |
| return newOwnedUseCase; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public UseCase getOwnedUseCase(String name) { |
| for (Iterator i = getOwnedUseCases().iterator(); i.hasNext();) { |
| UseCase ownedUseCase = (UseCase) i.next(); |
| if (name.equals(ownedUseCase.getName())) { |
| return ownedUseCase; |
| } |
| } |
| return null; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public List getUseCases() { |
| List useCase = (List) eVirtualGet(UMLPackage.CLASSIFIER__USE_CASE); |
| if (useCase == null) { |
| eVirtualSet(UMLPackage.CLASSIFIER__USE_CASE, |
| useCase = new EObjectWithInverseResolvingEList.ManyInverse( |
| UseCase.class, this, UMLPackage.CLASSIFIER__USE_CASE, |
| UMLPackage.USE_CASE__SUBJECT)); |
| } |
| return useCase; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public UseCase getUseCase(String name) { |
| for (Iterator i = getUseCases().iterator(); i.hasNext();) { |
| UseCase useCase = (UseCase) i.next(); |
| if (name.equals(useCase.getName())) { |
| return useCase; |
| } |
| } |
| return null; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public List getSubstitutions() { |
| List substitution = (List) eVirtualGet(UMLPackage.CLASSIFIER__SUBSTITUTION); |
| if (substitution == null) { |
| eVirtualSet(UMLPackage.CLASSIFIER__SUBSTITUTION, |
| substitution = new SubsetEObjectContainmentWithInverseEList( |
| Substitution.class, this, |
| UMLPackage.CLASSIFIER__SUBSTITUTION, |
| new int[]{UMLPackage.CLASSIFIER__CLIENT_DEPENDENCY}, |
| UMLPackage.SUBSTITUTION__SUBSTITUTING_CLASSIFIER)); |
| } |
| return substitution; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Substitution createSubstitution() { |
| Substitution newSubstitution = UMLFactory.eINSTANCE |
| .createSubstitution(); |
| getSubstitutions().add(newSubstitution); |
| return newSubstitution; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Substitution getSubstitution(String name) { |
| for (Iterator i = getSubstitutions().iterator(); i.hasNext();) { |
| Substitution substitution = (Substitution) i.next(); |
| if (name.equals(substitution.getName())) { |
| return substitution; |
| } |
| } |
| return null; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public CollaborationUse getRepresentation() { |
| CollaborationUse representation = (CollaborationUse) eVirtualGet(UMLPackage.CLASSIFIER__REPRESENTATION); |
| return representation; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setRepresentation(CollaborationUse newRepresentation) { |
| if (newRepresentation != null |
| && !getCollaborationUses().contains(newRepresentation)) { |
| getCollaborationUses().add(newRepresentation); |
| } |
| CollaborationUse representation = newRepresentation; |
| Object oldRepresentation = eVirtualSet( |
| UMLPackage.CLASSIFIER__REPRESENTATION, representation); |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, |
| UMLPackage.CLASSIFIER__REPRESENTATION, |
| oldRepresentation == EVIRTUAL_NO_VALUE |
| ? null |
| : oldRepresentation, representation)); |
| |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public RedefinableTemplateSignature getOwnedSignature() { |
| RedefinableTemplateSignature ownedSignature = (RedefinableTemplateSignature) eVirtualGet(UMLPackage.CLASSIFIER__OWNED_SIGNATURE); |
| return ownedSignature; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetOwnedSignature( |
| RedefinableTemplateSignature newOwnedSignature, |
| NotificationChain msgs) { |
| Object oldOwnedSignature = eVirtualSet( |
| UMLPackage.CLASSIFIER__OWNED_SIGNATURE, newOwnedSignature); |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, |
| Notification.SET, UMLPackage.CLASSIFIER__OWNED_SIGNATURE, |
| oldOwnedSignature == EVIRTUAL_NO_VALUE |
| ? null |
| : oldOwnedSignature, newOwnedSignature); |
| if (msgs == null) |
| msgs = notification; |
| else |
| msgs.add(notification); |
| } |
| |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setOwnedSignature(RedefinableTemplateSignature newOwnedSignature) { |
| RedefinableTemplateSignature ownedSignature = (RedefinableTemplateSignature) eVirtualGet(UMLPackage.CLASSIFIER__OWNED_SIGNATURE); |
| if (newOwnedSignature != ownedSignature) { |
| NotificationChain msgs = null; |
| if (ownedSignature != null) |
| msgs = ((InternalEObject) ownedSignature).eInverseRemove(this, |
| UMLPackage.REDEFINABLE_TEMPLATE_SIGNATURE__CLASSIFIER, |
| RedefinableTemplateSignature.class, msgs); |
| if (newOwnedSignature != null) |
| msgs = ((InternalEObject) newOwnedSignature).eInverseAdd(this, |
| UMLPackage.REDEFINABLE_TEMPLATE_SIGNATURE__CLASSIFIER, |
| RedefinableTemplateSignature.class, msgs); |
| msgs = basicSetOwnedSignature(newOwnedSignature, msgs); |
| if (msgs != null) |
| msgs.dispatch(); |
| } else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, |
| UMLPackage.CLASSIFIER__OWNED_SIGNATURE, newOwnedSignature, |
| newOwnedSignature)); |
| |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public RedefinableTemplateSignature createOwnedSignature() { |
| RedefinableTemplateSignature newOwnedSignature = UMLFactory.eINSTANCE |
| .createRedefinableTemplateSignature(); |
| setOwnedSignature(newOwnedSignature); |
| return newOwnedSignature; |
| } |
| |
| /** |
| * <!-- 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 redefinable) { |
| return RedefinableElementOperations.isRedefinitionContextValid(this, |
| redefinable); |
| } |
| |
| /** |
| * <!-- 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 isRedefinitionContextValid() { |
| return RedefinableElementOperations.isRedefinitionContextValid(this); |
| } |
| |
| /** |
| * <!-- 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 ClassifierOperations.isTemplate(this); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean validateNoCyclesInGeneralization( |
| DiagnosticChain diagnostics, Map context) { |
| return ClassifierOperations.validateNoCyclesInGeneralization(this, |
| diagnostics, context); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean validateSpecializeType(DiagnosticChain diagnostics, |
| Map context) { |
| return ClassifierOperations.validateSpecializeType(this, diagnostics, |
| context); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean validateGeneralizationHierarchies( |
| DiagnosticChain diagnostics, Map context) { |
| return ClassifierOperations.validateGeneralizationHierarchies(this, |
| diagnostics, context); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean validateSpecialize(DiagnosticChain diagnostics, Map context) { |
| return ClassifierOperations.validateSpecialize(this, diagnostics, |
| context); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean validateMapsToGeneralizationSet(DiagnosticChain diagnostics, |
| Map context) { |
| return ClassifierOperations.validateMapsToGeneralizationSet(this, |
| diagnostics, context); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean maySpecializeType(Classifier c) { |
| return ClassifierOperations.maySpecializeType(this, c); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public List allFeatures() { |
| CacheAdapter cache = getCacheAdapter(); |
| if (cache != null) { |
| List result = (List) cache.get(this, UMLPackage.eINSTANCE |
| .getClassifier().getEOperations().get(8)); |
| if (result == null) { |
| cache.put(this, UMLPackage.eINSTANCE.getClassifier() |
| .getEOperations().get(8), result = ClassifierOperations |
| .allFeatures(this)); |
| } |
| return result; |
| } |
| return ClassifierOperations.allFeatures(this); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public List parents() { |
| CacheAdapter cache = getCacheAdapter(); |
| if (cache != null) { |
| List result = (List) cache.get(eResource(), this, |
| UMLPackage.eINSTANCE.getClassifier().getEOperations().get(9)); |
| if (result == null) { |
| cache.put(eResource(), this, UMLPackage.eINSTANCE |
| .getClassifier().getEOperations().get(9), |
| result = ClassifierOperations.parents(this)); |
| } |
| return result; |
| } |
| return ClassifierOperations.parents(this); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public List inheritableMembers(Classifier c) { |
| return ClassifierOperations.inheritableMembers(this, c); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean hasVisibilityOf(NamedElement n) { |
| return ClassifierOperations.hasVisibilityOf(this, n); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean conformsTo(Classifier other) { |
| return ClassifierOperations.conformsTo(this, other); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public List inherit(List inhs) { |
| return ClassifierOperations.inherit(this, inhs); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean maySpecializeType() { |
| return ClassifierOperations.maySpecializeType(this); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public List allParents() { |
| CacheAdapter cache = getCacheAdapter(); |
| if (cache != null) { |
| List result = (List) cache.get(this, UMLPackage.eINSTANCE |
| .getClassifier().getEOperations().get(15)); |
| if (result == null) { |
| cache.put(this, UMLPackage.eINSTANCE.getClassifier() |
| .getEOperations().get(15), result = ClassifierOperations |
| .allParents(this)); |
| } |
| return result; |
| } |
| return ClassifierOperations.allParents(this); |
| } |
| |
| /** |
| * <!-- 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.CLASSIFIER__EANNOTATIONS : |
| return ((InternalEList) getEAnnotations()).basicAdd( |
| otherEnd, msgs); |
| case UMLPackage.CLASSIFIER__CLIENT_DEPENDENCY : |
| return ((InternalEList) getClientDependencies()).basicAdd( |
| otherEnd, msgs); |
| case UMLPackage.CLASSIFIER__ELEMENT_IMPORT : |
| return ((InternalEList) getElementImports()).basicAdd( |
| otherEnd, msgs); |
| case UMLPackage.CLASSIFIER__PACKAGE_IMPORT : |
| return ((InternalEList) getPackageImports()).basicAdd( |
| otherEnd, msgs); |
| case UMLPackage.CLASSIFIER__OWNED_RULE : |
| return ((InternalEList) getOwnedRules()).basicAdd(otherEnd, |
| msgs); |
| case UMLPackage.CLASSIFIER__TEMPLATE_PARAMETER : |
| TemplateParameter templateParameter = (TemplateParameter) eVirtualGet(UMLPackage.CLASSIFIER__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.CLASSIFIER__OWNING_TEMPLATE_PARAMETER : |
| if (eContainer != null) |
| msgs = eBasicRemoveFromContainer(msgs); |
| return eBasicSetContainer(otherEnd, |
| UMLPackage.CLASSIFIER__OWNING_TEMPLATE_PARAMETER, msgs); |
| case UMLPackage.CLASSIFIER__TEMPLATE_BINDING : |
| return ((InternalEList) getTemplateBindings()).basicAdd( |
| otherEnd, msgs); |
| case UMLPackage.CLASSIFIER__OWNED_TEMPLATE_SIGNATURE : |
| TemplateSignature ownedTemplateSignature = (TemplateSignature) eVirtualGet(UMLPackage.CLASSIFIER__OWNED_TEMPLATE_SIGNATURE); |
| if (ownedTemplateSignature != null) |
| msgs = ((InternalEObject) ownedTemplateSignature) |
| .eInverseRemove( |
| this, |
| EOPPOSITE_FEATURE_BASE |
| - UMLPackage.CLASSIFIER__OWNED_TEMPLATE_SIGNATURE, |
| null, msgs); |
| return basicSetOwnedTemplateSignature( |
| (TemplateSignature) otherEnd, msgs); |
| case UMLPackage.CLASSIFIER__GENERALIZATION : |
| return ((InternalEList) getGeneralizations()).basicAdd( |
| otherEnd, msgs); |
| case UMLPackage.CLASSIFIER__POWERTYPE_EXTENT : |
| return ((InternalEList) getPowertypeExtents()).basicAdd( |
| otherEnd, msgs); |
| case UMLPackage.CLASSIFIER__USE_CASE : |
| return ((InternalEList) getUseCases()).basicAdd(otherEnd, |
| msgs); |
| case UMLPackage.CLASSIFIER__SUBSTITUTION : |
| return ((InternalEList) getSubstitutions()).basicAdd( |
| otherEnd, msgs); |
| case UMLPackage.CLASSIFIER__OWNED_SIGNATURE : |
| RedefinableTemplateSignature ownedSignature = (RedefinableTemplateSignature) eVirtualGet(UMLPackage.CLASSIFIER__OWNED_SIGNATURE); |
| if (ownedSignature != null) |
| msgs = ((InternalEObject) ownedSignature) |
| .eInverseRemove(this, EOPPOSITE_FEATURE_BASE |
| - UMLPackage.CLASSIFIER__OWNED_SIGNATURE, null, |
| msgs); |
| return basicSetOwnedSignature( |
| (RedefinableTemplateSignature) otherEnd, 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.CLASSIFIER__EANNOTATIONS : |
| return ((InternalEList) getEAnnotations()).basicRemove( |
| otherEnd, msgs); |
| case UMLPackage.CLASSIFIER__OWNED_COMMENT : |
| return ((InternalEList) getOwnedComments()).basicRemove( |
| otherEnd, msgs); |
| case UMLPackage.CLASSIFIER__CLIENT_DEPENDENCY : |
| return ((InternalEList) getClientDependencies()) |
| .basicRemove(otherEnd, msgs); |
| case UMLPackage.CLASSIFIER__NAME_EXPRESSION : |
| return basicSetNameExpression(null, msgs); |
| case UMLPackage.CLASSIFIER__ELEMENT_IMPORT : |
| return ((InternalEList) getElementImports()).basicRemove( |
| otherEnd, msgs); |
| case UMLPackage.CLASSIFIER__PACKAGE_IMPORT : |
| return ((InternalEList) getPackageImports()).basicRemove( |
| otherEnd, msgs); |
| case UMLPackage.CLASSIFIER__OWNED_RULE : |
| return ((InternalEList) getOwnedRules()).basicRemove( |
| otherEnd, msgs); |
| case UMLPackage.CLASSIFIER__TEMPLATE_PARAMETER : |
| return basicSetTemplateParameter(null, msgs); |
| case UMLPackage.CLASSIFIER__OWNING_TEMPLATE_PARAMETER : |
| return eBasicSetContainer(null, |
| UMLPackage.CLASSIFIER__OWNING_TEMPLATE_PARAMETER, msgs); |
| case UMLPackage.CLASSIFIER__TEMPLATE_BINDING : |
| return ((InternalEList) getTemplateBindings()).basicRemove( |
| otherEnd, msgs); |
| case UMLPackage.CLASSIFIER__OWNED_TEMPLATE_SIGNATURE : |
| return basicSetOwnedTemplateSignature(null, msgs); |
| case UMLPackage.CLASSIFIER__GENERALIZATION : |
| return ((InternalEList) getGeneralizations()).basicRemove( |
| otherEnd, msgs); |
| case UMLPackage.CLASSIFIER__POWERTYPE_EXTENT : |
| return ((InternalEList) getPowertypeExtents()).basicRemove( |
| otherEnd, msgs); |
| case UMLPackage.CLASSIFIER__OWNED_USE_CASE : |
| return ((InternalEList) getOwnedUseCases()).basicRemove( |
| otherEnd, msgs); |
| case UMLPackage.CLASSIFIER__USE_CASE : |
| return ((InternalEList) getUseCases()).basicRemove( |
| otherEnd, msgs); |
| case UMLPackage.CLASSIFIER__SUBSTITUTION : |
| return ((InternalEList) getSubstitutions()).basicRemove( |
| otherEnd, msgs); |
| case UMLPackage.CLASSIFIER__COLLABORATION_USE : |
| return ((InternalEList) getCollaborationUses()) |
| .basicRemove(otherEnd, msgs); |
| case UMLPackage.CLASSIFIER__OWNED_SIGNATURE : |
| return basicSetOwnedSignature(null, 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.CLASSIFIER__OWNING_TEMPLATE_PARAMETER : |
| return eContainer |
| .eInverseRemove( |
| this, |
| UMLPackage.TEMPLATE_PARAMETER__OWNED_PARAMETERED_ELEMENT, |
| TemplateParameter.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.CLASSIFIER__EANNOTATIONS : |
| return getEAnnotations(); |
| case UMLPackage.CLASSIFIER__OWNED_ELEMENT : |
| return getOwnedElements(); |
| case UMLPackage.CLASSIFIER__OWNER : |
| if (resolve) |
| return getOwner(); |
| return basicGetOwner(); |
| case UMLPackage.CLASSIFIER__OWNED_COMMENT : |
| return getOwnedComments(); |
| case UMLPackage.CLASSIFIER__NAME : |
| return getName(); |
| case UMLPackage.CLASSIFIER__VISIBILITY : |
| return getVisibility(); |
| case UMLPackage.CLASSIFIER__QUALIFIED_NAME : |
| return getQualifiedName(); |
| case UMLPackage.CLASSIFIER__CLIENT_DEPENDENCY : |
| return getClientDependencies(); |
| case UMLPackage.CLASSIFIER__NAMESPACE : |
| if (resolve) |
| return getNamespace(); |
| return basicGetNamespace(); |
| case UMLPackage.CLASSIFIER__NAME_EXPRESSION : |
| return getNameExpression(); |
| case UMLPackage.CLASSIFIER__ELEMENT_IMPORT : |
| return getElementImports(); |
| case UMLPackage.CLASSIFIER__PACKAGE_IMPORT : |
| return getPackageImports(); |
| case UMLPackage.CLASSIFIER__OWNED_RULE : |
| return getOwnedRules(); |
| case UMLPackage.CLASSIFIER__MEMBER : |
| return getMembers(); |
| case UMLPackage.CLASSIFIER__IMPORTED_MEMBER : |
| return getImportedMembers(); |
| case UMLPackage.CLASSIFIER__OWNED_MEMBER : |
| return getOwnedMembers(); |
| case UMLPackage.CLASSIFIER__IS_LEAF : |
| return isLeaf() |
| ? Boolean.TRUE |
| : Boolean.FALSE; |
| case UMLPackage.CLASSIFIER__REDEFINED_ELEMENT : |
| return getRedefinedElements(); |
| case UMLPackage.CLASSIFIER__REDEFINITION_CONTEXT : |
| return getRedefinitionContexts(); |
| case UMLPackage.CLASSIFIER__TEMPLATE_PARAMETER : |
| if (resolve) |
| return getTemplateParameter(); |
| return basicGetTemplateParameter(); |
| case UMLPackage.CLASSIFIER__OWNING_TEMPLATE_PARAMETER : |
| return getOwningTemplateParameter(); |
| case UMLPackage.CLASSIFIER__PACKAGE : |
| return getPackage(); |
| case UMLPackage.CLASSIFIER__TEMPLATE_BINDING : |
| return getTemplateBindings(); |
| case UMLPackage.CLASSIFIER__OWNED_TEMPLATE_SIGNATURE : |
| return getOwnedTemplateSignature(); |
| case UMLPackage.CLASSIFIER__IS_ABSTRACT : |
| return isAbstract() |
| ? Boolean.TRUE |
| : Boolean.FALSE; |
| case UMLPackage.CLASSIFIER__GENERALIZATION : |
| return getGeneralizations(); |
| case UMLPackage.CLASSIFIER__POWERTYPE_EXTENT : |
| return getPowertypeExtents(); |
| case UMLPackage.CLASSIFIER__FEATURE : |
| return getFeatures(); |
| case UMLPackage.CLASSIFIER__INHERITED_MEMBER : |
| return getInheritedMembers(); |
| case UMLPackage.CLASSIFIER__REDEFINED_CLASSIFIER : |
| return getRedefinedClassifiers(); |
| case UMLPackage.CLASSIFIER__GENERAL : |
| return getGenerals(); |
| case UMLPackage.CLASSIFIER__OWNED_USE_CASE : |
| return getOwnedUseCases(); |
| case UMLPackage.CLASSIFIER__USE_CASE : |
| return getUseCases(); |
| case UMLPackage.CLASSIFIER__SUBSTITUTION : |
| return getSubstitutions(); |
| case UMLPackage.CLASSIFIER__ATTRIBUTE : |
| return getAttributes(); |
| case UMLPackage.CLASSIFIER__REPRESENTATION : |
| return getRepresentation(); |
| case UMLPackage.CLASSIFIER__COLLABORATION_USE : |
| return getCollaborationUses(); |
| case UMLPackage.CLASSIFIER__OWNED_SIGNATURE : |
| return getOwnedSignature(); |
| } |
| return eDynamicGet(eFeature, resolve); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void eSet(EStructuralFeature eFeature, Object newValue) { |
| switch (eDerivedStructuralFeatureID(eFeature)) { |
| case UMLPackage.CLASSIFIER__EANNOTATIONS : |
| getEAnnotations().clear(); |
| getEAnnotations().addAll((Collection) newValue); |
| return; |
| case UMLPackage.CLASSIFIER__OWNED_COMMENT : |
| getOwnedComments().clear(); |
| getOwnedComments().addAll((Collection) newValue); |
| return; |
| case UMLPackage.CLASSIFIER__NAME : |
| setName((String) newValue); |
| return; |
| case UMLPackage.CLASSIFIER__VISIBILITY : |
| setVisibility((VisibilityKind) newValue); |
| return; |
| case UMLPackage.CLASSIFIER__CLIENT_DEPENDENCY : |
| getClientDependencies().clear(); |
| getClientDependencies().addAll((Collection) newValue); |
| return; |
| case UMLPackage.CLASSIFIER__NAME_EXPRESSION : |
| setNameExpression((StringExpression) newValue); |
| return; |
| case UMLPackage.CLASSIFIER__ELEMENT_IMPORT : |
| getElementImports().clear(); |
| getElementImports().addAll((Collection) newValue); |
| return; |
| case UMLPackage.CLASSIFIER__PACKAGE_IMPORT : |
| getPackageImports().clear(); |
| getPackageImports().addAll((Collection) newValue); |
| return; |
| case UMLPackage.CLASSIFIER__OWNED_RULE : |
| getOwnedRules().clear(); |
| getOwnedRules().addAll((Collection) newValue); |
| return; |
| case UMLPackage.CLASSIFIER__IS_LEAF : |
| setIsLeaf(((Boolean) newValue).booleanValue()); |
| return; |
| case UMLPackage.CLASSIFIER__TEMPLATE_PARAMETER : |
| setTemplateParameter((TemplateParameter) newValue); |
| return; |
| case UMLPackage.CLASSIFIER__OWNING_TEMPLATE_PARAMETER : |
| setOwningTemplateParameter((TemplateParameter) newValue); |
| return; |
| case UMLPackage.CLASSIFIER__PACKAGE : |
| setPackage((org.eclipse.uml2.uml.Package) newValue); |
| return; |
| case UMLPackage.CLASSIFIER__TEMPLATE_BINDING : |
| getTemplateBindings().clear(); |
| getTemplateBindings().addAll((Collection) newValue); |
| return; |
| case UMLPackage.CLASSIFIER__OWNED_TEMPLATE_SIGNATURE : |
| setOwnedTemplateSignature((TemplateSignature) newValue); |
| return; |
| case UMLPackage.CLASSIFIER__IS_ABSTRACT : |
| setIsAbstract(((Boolean) newValue).booleanValue()); |
| return; |
| case UMLPackage.CLASSIFIER__GENERALIZATION : |
| getGeneralizations().clear(); |
| getGeneralizations().addAll((Collection) newValue); |
| return; |
| case UMLPackage.CLASSIFIER__POWERTYPE_EXTENT : |
| getPowertypeExtents().clear(); |
| getPowertypeExtents().addAll((Collection) newValue); |
| return; |
| case UMLPackage.CLASSIFIER__INHERITED_MEMBER : |
| getInheritedMembers().clear(); |
| getInheritedMembers().addAll((Collection) newValue); |
| return; |
| case UMLPackage.CLASSIFIER__REDEFINED_CLASSIFIER : |
| getRedefinedClassifiers().clear(); |
| getRedefinedClassifiers().addAll((Collection) newValue); |
| return; |
| case UMLPackage.CLASSIFIER__GENERAL : |
| getGenerals().clear(); |
| getGenerals().addAll((Collection) newValue); |
| return; |
| case UMLPackage.CLASSIFIER__OWNED_USE_CASE : |
| getOwnedUseCases().clear(); |
| getOwnedUseCases().addAll((Collection) newValue); |
| return; |
| case UMLPackage.CLASSIFIER__USE_CASE : |
| getUseCases().clear(); |
| getUseCases().addAll((Collection) newValue); |
| return; |
| case UMLPackage.CLASSIFIER__SUBSTITUTION : |
| getSubstitutions().clear(); |
| getSubstitutions().addAll((Collection) newValue); |
| return; |
| case UMLPackage.CLASSIFIER__REPRESENTATION : |
| setRepresentation((CollaborationUse) newValue); |
| return; |
| case UMLPackage.CLASSIFIER__COLLABORATION_USE : |
| getCollaborationUses().clear(); |
| getCollaborationUses().addAll((Collection) newValue); |
| return; |
| case UMLPackage.CLASSIFIER__OWNED_SIGNATURE : |
| setOwnedSignature((RedefinableTemplateSignature) newValue); |
| return; |
| } |
| eDynamicSet(eFeature, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void eUnset(EStructuralFeature eFeature) { |
| switch (eDerivedStructuralFeatureID(eFeature)) { |
| case UMLPackage.CLASSIFIER__EANNOTATIONS : |
| getEAnnotations().clear(); |
| return; |
| case UMLPackage.CLASSIFIER__OWNED_COMMENT : |
| getOwnedComments().clear(); |
| return; |
| case UMLPackage.CLASSIFIER__NAME : |
| setName(NAME_EDEFAULT); |
| return; |
| case UMLPackage.CLASSIFIER__VISIBILITY : |
| setVisibility(VISIBILITY_EDEFAULT); |
| return; |
| case UMLPackage.CLASSIFIER__CLIENT_DEPENDENCY : |
| getClientDependencies().clear(); |
| return; |
| case UMLPackage.CLASSIFIER__NAME_EXPRESSION : |
| setNameExpression((StringExpression) null); |
| return; |
| case UMLPackage.CLASSIFIER__ELEMENT_IMPORT : |
| getElementImports().clear(); |
| return; |
| case UMLPackage.CLASSIFIER__PACKAGE_IMPORT : |
| getPackageImports().clear(); |
| return; |
| case UMLPackage.CLASSIFIER__OWNED_RULE : |
| getOwnedRules().clear(); |
| return; |
| case UMLPackage.CLASSIFIER__IS_LEAF : |
| setIsLeaf(IS_LEAF_EDEFAULT); |
| return; |
| case UMLPackage.CLASSIFIER__TEMPLATE_PARAMETER : |
| setTemplateParameter((TemplateParameter) null); |
| return; |
| case UMLPackage.CLASSIFIER__OWNING_TEMPLATE_PARAMETER : |
| setOwningTemplateParameter((TemplateParameter) null); |
| return; |
| case UMLPackage.CLASSIFIER__PACKAGE : |
| setPackage((org.eclipse.uml2.uml.Package) null); |
| return; |
| case UMLPackage.CLASSIFIER__TEMPLATE_BINDING : |
| getTemplateBindings().clear(); |
| return; |
| case UMLPackage.CLASSIFIER__OWNED_TEMPLATE_SIGNATURE : |
| setOwnedTemplateSignature((TemplateSignature) null); |
| return; |
| case UMLPackage.CLASSIFIER__IS_ABSTRACT : |
| setIsAbstract(IS_ABSTRACT_EDEFAULT); |
| return; |
| case UMLPackage.CLASSIFIER__GENERALIZATION : |
| getGeneralizations().clear(); |
| return; |
| case UMLPackage.CLASSIFIER__POWERTYPE_EXTENT : |
| getPowertypeExtents().clear(); |
| return; |
| case UMLPackage.CLASSIFIER__INHERITED_MEMBER : |
| getInheritedMembers().clear(); |
| return; |
| case UMLPackage.CLASSIFIER__REDEFINED_CLASSIFIER : |
| getRedefinedClassifiers().clear(); |
| return; |
| case UMLPackage.CLASSIFIER__GENERAL : |
| getGenerals().clear(); |
| return; |
| case UMLPackage.CLASSIFIER__OWNED_USE_CASE : |
| getOwnedUseCases().clear(); |
| return; |
| case UMLPackage.CLASSIFIER__USE_CASE : |
| getUseCases().clear(); |
| return; |
| case UMLPackage.CLASSIFIER__SUBSTITUTION : |
| getSubstitutions().clear(); |
| return; |
| case UMLPackage.CLASSIFIER__REPRESENTATION : |
| setRepresentation((CollaborationUse) null); |
| return; |
| case UMLPackage.CLASSIFIER__COLLABORATION_USE : |
| getCollaborationUses().clear(); |
| return; |
| case UMLPackage.CLASSIFIER__OWNED_SIGNATURE : |
| setOwnedSignature((RedefinableTemplateSignature) null); |
| return; |
| } |
| eDynamicUnset(eFeature); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean eIsSet(EStructuralFeature eFeature) { |
| switch (eDerivedStructuralFeatureID(eFeature)) { |
| case UMLPackage.CLASSIFIER__EANNOTATIONS : |
| return eAnnotations != null && !eAnnotations.isEmpty(); |
| case UMLPackage.CLASSIFIER__OWNED_ELEMENT : |
| return isSetOwnedElements(); |
| case UMLPackage.CLASSIFIER__OWNER : |
| return isSetOwner(); |
| case UMLPackage.CLASSIFIER__OWNED_COMMENT : |
| List ownedComment = (List) eVirtualGet(UMLPackage.CLASSIFIER__OWNED_COMMENT); |
| return ownedComment != null && !ownedComment.isEmpty(); |
| case UMLPackage.CLASSIFIER__NAME : |
| String name = eVirtualIsSet(UMLPackage.CLASSIFIER__NAME) |
| ? (String) eVirtualGet(UMLPackage.CLASSIFIER__NAME) |
| : NAME_EDEFAULT; |
| return NAME_EDEFAULT == null |
| ? name != null |
| : !NAME_EDEFAULT.equals(name); |
| case UMLPackage.CLASSIFIER__VISIBILITY : |
| return eVirtualIsSet(UMLPackage.CLASSIFIER__VISIBILITY) |
| && eVirtualGet(UMLPackage.CLASSIFIER__VISIBILITY) != VISIBILITY_EDEFAULT; |
| case UMLPackage.CLASSIFIER__QUALIFIED_NAME : |
| return QUALIFIED_NAME_EDEFAULT == null |
| ? getQualifiedName() != null |
| : !QUALIFIED_NAME_EDEFAULT.equals(getQualifiedName()); |
| case UMLPackage.CLASSIFIER__CLIENT_DEPENDENCY : |
| List clientDependency = (List) eVirtualGet(UMLPackage.CLASSIFIER__CLIENT_DEPENDENCY); |
| return clientDependency != null && !clientDependency.isEmpty(); |
| case UMLPackage.CLASSIFIER__NAMESPACE : |
| return isSetNamespace(); |
| case UMLPackage.CLASSIFIER__NAME_EXPRESSION : |
| return eVirtualGet(UMLPackage.CLASSIFIER__NAME_EXPRESSION) != null; |
| case UMLPackage.CLASSIFIER__ELEMENT_IMPORT : |
| List elementImport = (List) eVirtualGet(UMLPackage.CLASSIFIER__ELEMENT_IMPORT); |
| return elementImport != null && !elementImport.isEmpty(); |
| case UMLPackage.CLASSIFIER__PACKAGE_IMPORT : |
| List packageImport = (List) eVirtualGet(UMLPackage.CLASSIFIER__PACKAGE_IMPORT); |
| return packageImport != null && !packageImport.isEmpty(); |
| case UMLPackage.CLASSIFIER__OWNED_RULE : |
| List ownedRule = (List) eVirtualGet(UMLPackage.CLASSIFIER__OWNED_RULE); |
| return ownedRule != null && !ownedRule.isEmpty(); |
| case UMLPackage.CLASSIFIER__MEMBER : |
| return isSetMembers(); |
| case UMLPackage.CLASSIFIER__IMPORTED_MEMBER : |
| return !getImportedMembers().isEmpty(); |
| case UMLPackage.CLASSIFIER__OWNED_MEMBER : |
| return isSetOwnedMembers(); |
| case UMLPackage.CLASSIFIER__IS_LEAF : |
| return ((eFlags & IS_LEAF_EFLAG) != 0) != IS_LEAF_EDEFAULT; |
| case UMLPackage.CLASSIFIER__REDEFINED_ELEMENT : |
| return isSetRedefinedElements(); |
| case UMLPackage.CLASSIFIER__REDEFINITION_CONTEXT : |
| return isSetRedefinitionContexts(); |
| case UMLPackage.CLASSIFIER__TEMPLATE_PARAMETER : |
| return eVirtualGet(UMLPackage.CLASSIFIER__TEMPLATE_PARAMETER) != null; |
| case UMLPackage.CLASSIFIER__OWNING_TEMPLATE_PARAMETER : |
| return getOwningTemplateParameter() != null; |
| case UMLPackage.CLASSIFIER__PACKAGE : |
| return getPackage() != null; |
| case UMLPackage.CLASSIFIER__TEMPLATE_BINDING : |
| List templateBinding = (List) eVirtualGet(UMLPackage.CLASSIFIER__TEMPLATE_BINDING); |
| return templateBinding != null && !templateBinding.isEmpty(); |
| case UMLPackage.CLASSIFIER__OWNED_TEMPLATE_SIGNATURE : |
| return eVirtualGet(UMLPackage.CLASSIFIER__OWNED_TEMPLATE_SIGNATURE) != null; |
| case UMLPackage.CLASSIFIER__IS_ABSTRACT : |
| return ((eFlags & IS_ABSTRACT_EFLAG) != 0) != IS_ABSTRACT_EDEFAULT; |
| case UMLPackage.CLASSIFIER__GENERALIZATION : |
| List generalization = (List) eVirtualGet(UMLPackage.CLASSIFIER__GENERALIZATION); |
| return generalization != null && !generalization.isEmpty(); |
| case UMLPackage.CLASSIFIER__POWERTYPE_EXTENT : |
| List powertypeExtent = (List) eVirtualGet(UMLPackage.CLASSIFIER__POWERTYPE_EXTENT); |
| return powertypeExtent != null && !powertypeExtent.isEmpty(); |
| case UMLPackage.CLASSIFIER__FEATURE : |
| return isSetFeatures(); |
| case UMLPackage.CLASSIFIER__INHERITED_MEMBER : |
| return !getInheritedMembers().isEmpty(); |
| case UMLPackage.CLASSIFIER__REDEFINED_CLASSIFIER : |
| List redefinedClassifier = (List) eVirtualGet(UMLPackage.CLASSIFIER__REDEFINED_CLASSIFIER); |
| return redefinedClassifier != null |
| && !redefinedClassifier.isEmpty(); |
| case UMLPackage.CLASSIFIER__GENERAL : |
| return !getGenerals().isEmpty(); |
| case UMLPackage.CLASSIFIER__OWNED_USE_CASE : |
| List ownedUseCase = (List) eVirtualGet(UMLPackage.CLASSIFIER__OWNED_USE_CASE); |
| return ownedUseCase != null && !ownedUseCase.isEmpty(); |
| case UMLPackage.CLASSIFIER__USE_CASE : |
| List useCase = (List) eVirtualGet(UMLPackage.CLASSIFIER__USE_CASE); |
| return useCase != null && !useCase.isEmpty(); |
| case UMLPackage.CLASSIFIER__SUBSTITUTION : |
| List substitution = (List) eVirtualGet(UMLPackage.CLASSIFIER__SUBSTITUTION); |
| return substitution != null && !substitution.isEmpty(); |
| case UMLPackage.CLASSIFIER__ATTRIBUTE : |
| return isSetAttributes(); |
| case UMLPackage.CLASSIFIER__REPRESENTATION : |
| return eVirtualGet(UMLPackage.CLASSIFIER__REPRESENTATION) != null; |
| case UMLPackage.CLASSIFIER__COLLABORATION_USE : |
| List collaborationUse = (List) eVirtualGet(UMLPackage.CLASSIFIER__COLLABORATION_USE); |
| return collaborationUse != null && !collaborationUse.isEmpty(); |
| case UMLPackage.CLASSIFIER__OWNED_SIGNATURE : |
| return eVirtualGet(UMLPackage.CLASSIFIER__OWNED_SIGNATURE) != null; |
| } |
| return eDynamicIsSet(eFeature); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { |
| if (baseClass == RedefinableElement.class) { |
| switch (derivedFeatureID) { |
| case UMLPackage.CLASSIFIER__IS_LEAF : |
| return UMLPackage.REDEFINABLE_ELEMENT__IS_LEAF; |
| case UMLPackage.CLASSIFIER__REDEFINED_ELEMENT : |
| return UMLPackage.REDEFINABLE_ELEMENT__REDEFINED_ELEMENT; |
| case UMLPackage.CLASSIFIER__REDEFINITION_CONTEXT : |
| return UMLPackage.REDEFINABLE_ELEMENT__REDEFINITION_CONTEXT; |
| default : |
| return -1; |
| } |
| } |
| if (baseClass == ParameterableElement.class) { |
| switch (derivedFeatureID) { |
| case UMLPackage.CLASSIFIER__TEMPLATE_PARAMETER : |
| return UMLPackage.PARAMETERABLE_ELEMENT__TEMPLATE_PARAMETER; |
| case UMLPackage.CLASSIFIER__OWNING_TEMPLATE_PARAMETER : |
| return UMLPackage.PARAMETERABLE_ELEMENT__OWNING_TEMPLATE_PARAMETER; |
| default : |
| return -1; |
| } |
| } |
| if (baseClass == PackageableElement.class) { |
| switch (derivedFeatureID) { |
| default : |
| return -1; |
| } |
| } |
| if (baseClass == Type.class) { |
| switch (derivedFeatureID) { |
| case UMLPackage.CLASSIFIER__PACKAGE : |
| return UMLPackage.TYPE__PACKAGE; |
| default : |
| return -1; |
| } |
| } |
| if (baseClass == TemplateableElement.class) { |
| switch (derivedFeatureID) { |
| case UMLPackage.CLASSIFIER__TEMPLATE_BINDING : |
| return UMLPackage.TEMPLATEABLE_ELEMENT__TEMPLATE_BINDING; |
| case UMLPackage.CLASSIFIER__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 == RedefinableElement.class) { |
| switch (baseFeatureID) { |
| case UMLPackage.REDEFINABLE_ELEMENT__IS_LEAF : |
| return UMLPackage.CLASSIFIER__IS_LEAF; |
| case UMLPackage.REDEFINABLE_ELEMENT__REDEFINED_ELEMENT : |
| return UMLPackage.CLASSIFIER__REDEFINED_ELEMENT; |
| case UMLPackage.REDEFINABLE_ELEMENT__REDEFINITION_CONTEXT : |
| return UMLPackage.CLASSIFIER__REDEFINITION_CONTEXT; |
| default : |
| return -1; |
| } |
| } |
| if (baseClass == ParameterableElement.class) { |
| switch (baseFeatureID) { |
| case UMLPackage.PARAMETERABLE_ELEMENT__TEMPLATE_PARAMETER : |
| return UMLPackage.CLASSIFIER__TEMPLATE_PARAMETER; |
| case UMLPackage.PARAMETERABLE_ELEMENT__OWNING_TEMPLATE_PARAMETER : |
| return UMLPackage.CLASSIFIER__OWNING_TEMPLATE_PARAMETER; |
| default : |
| return -1; |
| } |
| } |
| if (baseClass == PackageableElement.class) { |
| switch (baseFeatureID) { |
| default : |
| return -1; |
| } |
| } |
| if (baseClass == Type.class) { |
| switch (baseFeatureID) { |
| case UMLPackage.TYPE__PACKAGE : |
| return UMLPackage.CLASSIFIER__PACKAGE; |
| default : |
| return -1; |
| } |
| } |
| if (baseClass == TemplateableElement.class) { |
| switch (baseFeatureID) { |
| case UMLPackage.TEMPLATEABLE_ELEMENT__TEMPLATE_BINDING : |
| return UMLPackage.CLASSIFIER__TEMPLATE_BINDING; |
| case UMLPackage.TEMPLATEABLE_ELEMENT__OWNED_TEMPLATE_SIGNATURE : |
| return UMLPackage.CLASSIFIER__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(" (isLeaf: "); //$NON-NLS-1$ |
| result.append((eFlags & IS_LEAF_EFLAG) != 0); |
| result.append(", visibility: "); //$NON-NLS-1$ |
| result.append(eVirtualIsSet(UMLPackage.CLASSIFIER__VISIBILITY) |
| ? eVirtualGet(UMLPackage.CLASSIFIER__VISIBILITY) |
| : VISIBILITY_EDEFAULT); |
| result.append(", isAbstract: "); //$NON-NLS-1$ |
| result.append((eFlags & IS_ABSTRACT_EFLAG) != 0); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isSetRedefinedElements() { |
| return eIsSet(UMLPackage.eINSTANCE.getClassifier_RedefinedClassifier()); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isSetRedefinitionContexts() { |
| return false; |
| } |
| |
| /** |
| * <!-- 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 Namespace basicGetNamespace() { |
| org.eclipse.uml2.uml.Package package_ = getPackage(); |
| if (package_ != null) { |
| return package_; |
| } |
| return super.basicGetNamespace(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isSetNamespace() { |
| return super.isSetNamespace() |
| || eIsSet(UMLPackage.eINSTANCE.getType_Package()); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isSetOwnedElements() { |
| return super.isSetOwnedElements() |
| || eIsSet(UMLPackage.eINSTANCE |
| .getTemplateableElement_TemplateBinding()) |
| || eIsSet(UMLPackage.eINSTANCE |
| .getTemplateableElement_OwnedTemplateSignature()) |
| || eIsSet(UMLPackage.eINSTANCE.getClassifier_Generalization()) |
| || eIsSet(UMLPackage.eINSTANCE.getClassifier_Substitution()) |
| || eIsSet(UMLPackage.eINSTANCE.getClassifier_CollaborationUse()) |
| || eIsSet(UMLPackage.eINSTANCE.getClassifier_OwnedSignature()); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isSetFeatures() { |
| return isSetAttributes(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isSetMembers() { |
| return super.isSetMembers() || isSetFeatures() |
| || eIsSet(UMLPackage.eINSTANCE.getClassifier_InheritedMember()); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isSetOwnedMembers() { |
| return super.isSetOwnedMembers() |
| || eIsSet(UMLPackage.eINSTANCE.getClassifier_OwnedUseCase()); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isSetAttributes() { |
| return false; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean conformsTo(Type other) { |
| return conformsTo(other); |
| } |
| |
| } //ClassifierImpl |