| /* |
| * Copyright (c) 2005, 2011 IBM Corporation, Embarcadero Technologies, CEA, and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * IBM - initial API and implementation |
| * Kenn Hussey (Embarcadero Technologies) - 204200 |
| * Kenn Hussey - 286329, 323181 |
| * Kenn Hussey (CEA) - 327039, 351774 |
| * |
| */ |
| package org.eclipse.uml2.uml.internal.impl; |
| |
| import java.lang.reflect.InvocationTargetException; |
| import java.util.Collection; |
| import java.util.Map; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| |
| import org.eclipse.emf.common.util.DiagnosticChain; |
| |
| import org.eclipse.emf.common.util.EList; |
| |
| import org.eclipse.emf.ecore.EAnnotation; |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| |
| import org.eclipse.emf.ecore.resource.Resource; |
| |
| import org.eclipse.uml2.common.util.CacheAdapter; |
| import org.eclipse.uml2.common.util.DerivedEObjectEList; |
| import org.eclipse.uml2.common.util.DerivedUnionEObjectEList; |
| |
| import org.eclipse.uml2.uml.Classifier; |
| import org.eclipse.uml2.uml.Comment; |
| import org.eclipse.uml2.uml.Dependency; |
| import org.eclipse.uml2.uml.NamedElement; |
| import org.eclipse.uml2.uml.Namespace; |
| import org.eclipse.uml2.uml.RedefinableElement; |
| import org.eclipse.uml2.uml.Stereotype; |
| import org.eclipse.uml2.uml.StringExpression; |
| import org.eclipse.uml2.uml.UMLPackage; |
| import org.eclipse.uml2.uml.VisibilityKind; |
| |
| import org.eclipse.uml2.uml.internal.operations.RedefinableElementOperations; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Redefinable Element</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * <ul> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.RedefinableElementImpl#getRedefinedElements <em>Redefined Element</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.RedefinableElementImpl#getRedefinitionContexts <em>Redefinition Context</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.internal.impl.RedefinableElementImpl#isLeaf <em>Is Leaf</em>}</li> |
| * </ul> |
| * </p> |
| * |
| * @generated |
| */ |
| public abstract class RedefinableElementImpl |
| extends NamedElementImpl |
| implements RedefinableElement { |
| |
| /** |
| * 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 << 12; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected RedefinableElementImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return UMLPackage.Literals.REDEFINABLE_ELEMENT; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EList<RedefinableElement> getRedefinedElements() { |
| CacheAdapter cache = getCacheAdapter(); |
| if (cache != null) { |
| Resource eResource = eResource(); |
| @SuppressWarnings("unchecked") |
| EList<RedefinableElement> redefinedElements = (EList<RedefinableElement>) 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>( |
| RedefinableElement.class, this, |
| UMLPackage.REDEFINABLE_ELEMENT__REDEFINED_ELEMENT, |
| null)); |
| } |
| return redefinedElements; |
| } |
| return new DerivedUnionEObjectEList<RedefinableElement>( |
| RedefinableElement.class, this, |
| UMLPackage.REDEFINABLE_ELEMENT__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 (RedefinableElement redefinedElement : getRedefinedElements()) { |
| 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<Classifier> getRedefinitionContextsGen() { |
| CacheAdapter cache = getCacheAdapter(); |
| if (cache != null) { |
| Resource eResource = eResource(); |
| @SuppressWarnings("unchecked") |
| EList<Classifier> redefinitionContexts = (EList<Classifier>) 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>( |
| Classifier.class, |
| this, |
| UMLPackage.REDEFINABLE_ELEMENT__REDEFINITION_CONTEXT, |
| null)); |
| } |
| return redefinitionContexts; |
| } |
| return new DerivedUnionEObjectEList<Classifier>(Classifier.class, this, |
| UMLPackage.REDEFINABLE_ELEMENT__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.REDEFINABLE_ELEMENT__OWNER}; |
| |
| public EList<Classifier> getRedefinitionContexts() { |
| CacheAdapter cache = getCacheAdapter(); |
| if (cache != null) { |
| Resource eResource = eResource(); |
| @SuppressWarnings("unchecked") |
| EList<Classifier> redefinitionContexts = (EList<Classifier>) 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 DerivedEObjectEList<Classifier>( |
| Classifier.class, |
| this, |
| UMLPackage.REDEFINABLE_ELEMENT__REDEFINITION_CONTEXT, |
| REDEFINITION_CONTEXT_ESUBSETS)); |
| } |
| return redefinitionContexts; |
| } |
| return new DerivedEObjectEList<Classifier>(Classifier.class, this, |
| UMLPackage.REDEFINABLE_ELEMENT__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 (Classifier redefinitionContext : getRedefinitionContexts()) { |
| 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.REDEFINABLE_ELEMENT__IS_LEAF, oldIsLeaf, newIsLeaf)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean validateRedefinitionContextValid( |
| DiagnosticChain diagnostics, Map<Object, Object> context) { |
| return RedefinableElementOperations.validateRedefinitionContextValid( |
| this, diagnostics, context); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean validateRedefinitionConsistent(DiagnosticChain diagnostics, |
| Map<Object, Object> context) { |
| return RedefinableElementOperations.validateRedefinitionConsistent( |
| this, diagnostics, context); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean validateNonLeafRedefinition(DiagnosticChain diagnostics, |
| Map<Object, Object> context) { |
| return RedefinableElementOperations.validateNonLeafRedefinition(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 |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case UMLPackage.REDEFINABLE_ELEMENT__EANNOTATIONS : |
| return getEAnnotations(); |
| case UMLPackage.REDEFINABLE_ELEMENT__OWNED_COMMENT : |
| return getOwnedComments(); |
| case UMLPackage.REDEFINABLE_ELEMENT__OWNED_ELEMENT : |
| return getOwnedElements(); |
| case UMLPackage.REDEFINABLE_ELEMENT__OWNER : |
| if (resolve) |
| return getOwner(); |
| return basicGetOwner(); |
| case UMLPackage.REDEFINABLE_ELEMENT__CLIENT_DEPENDENCY : |
| return getClientDependencies(); |
| case UMLPackage.REDEFINABLE_ELEMENT__NAME : |
| return getName(); |
| case UMLPackage.REDEFINABLE_ELEMENT__NAME_EXPRESSION : |
| if (resolve) |
| return getNameExpression(); |
| return basicGetNameExpression(); |
| case UMLPackage.REDEFINABLE_ELEMENT__NAMESPACE : |
| if (resolve) |
| return getNamespace(); |
| return basicGetNamespace(); |
| case UMLPackage.REDEFINABLE_ELEMENT__QUALIFIED_NAME : |
| return getQualifiedName(); |
| case UMLPackage.REDEFINABLE_ELEMENT__VISIBILITY : |
| return getVisibility(); |
| case UMLPackage.REDEFINABLE_ELEMENT__IS_LEAF : |
| return isLeaf(); |
| case UMLPackage.REDEFINABLE_ELEMENT__REDEFINED_ELEMENT : |
| return getRedefinedElements(); |
| case UMLPackage.REDEFINABLE_ELEMENT__REDEFINITION_CONTEXT : |
| return getRedefinitionContexts(); |
| } |
| return eDynamicGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @SuppressWarnings("unchecked") |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case UMLPackage.REDEFINABLE_ELEMENT__EANNOTATIONS : |
| getEAnnotations().clear(); |
| getEAnnotations().addAll( |
| (Collection<? extends EAnnotation>) newValue); |
| return; |
| case UMLPackage.REDEFINABLE_ELEMENT__OWNED_COMMENT : |
| getOwnedComments().clear(); |
| getOwnedComments().addAll( |
| (Collection<? extends Comment>) newValue); |
| return; |
| case UMLPackage.REDEFINABLE_ELEMENT__CLIENT_DEPENDENCY : |
| getClientDependencies().clear(); |
| getClientDependencies().addAll( |
| (Collection<? extends Dependency>) newValue); |
| return; |
| case UMLPackage.REDEFINABLE_ELEMENT__NAME : |
| setName((String) newValue); |
| return; |
| case UMLPackage.REDEFINABLE_ELEMENT__NAME_EXPRESSION : |
| setNameExpression((StringExpression) newValue); |
| return; |
| case UMLPackage.REDEFINABLE_ELEMENT__VISIBILITY : |
| setVisibility((VisibilityKind) newValue); |
| return; |
| case UMLPackage.REDEFINABLE_ELEMENT__IS_LEAF : |
| setIsLeaf((Boolean) newValue); |
| return; |
| } |
| eDynamicSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case UMLPackage.REDEFINABLE_ELEMENT__EANNOTATIONS : |
| getEAnnotations().clear(); |
| return; |
| case UMLPackage.REDEFINABLE_ELEMENT__OWNED_COMMENT : |
| getOwnedComments().clear(); |
| return; |
| case UMLPackage.REDEFINABLE_ELEMENT__CLIENT_DEPENDENCY : |
| getClientDependencies().clear(); |
| return; |
| case UMLPackage.REDEFINABLE_ELEMENT__NAME : |
| unsetName(); |
| return; |
| case UMLPackage.REDEFINABLE_ELEMENT__NAME_EXPRESSION : |
| setNameExpression((StringExpression) null); |
| return; |
| case UMLPackage.REDEFINABLE_ELEMENT__VISIBILITY : |
| unsetVisibility(); |
| return; |
| case UMLPackage.REDEFINABLE_ELEMENT__IS_LEAF : |
| setIsLeaf(IS_LEAF_EDEFAULT); |
| return; |
| } |
| eDynamicUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case UMLPackage.REDEFINABLE_ELEMENT__EANNOTATIONS : |
| return eAnnotations != null && !eAnnotations.isEmpty(); |
| case UMLPackage.REDEFINABLE_ELEMENT__OWNED_COMMENT : |
| return ownedComments != null && !ownedComments.isEmpty(); |
| case UMLPackage.REDEFINABLE_ELEMENT__OWNED_ELEMENT : |
| return isSetOwnedElements(); |
| case UMLPackage.REDEFINABLE_ELEMENT__OWNER : |
| return isSetOwner(); |
| case UMLPackage.REDEFINABLE_ELEMENT__CLIENT_DEPENDENCY : |
| return clientDependencies != null |
| && !clientDependencies.isEmpty(); |
| case UMLPackage.REDEFINABLE_ELEMENT__NAME : |
| return isSetName(); |
| case UMLPackage.REDEFINABLE_ELEMENT__NAME_EXPRESSION : |
| return nameExpression != null; |
| case UMLPackage.REDEFINABLE_ELEMENT__NAMESPACE : |
| return isSetNamespace(); |
| case UMLPackage.REDEFINABLE_ELEMENT__QUALIFIED_NAME : |
| return QUALIFIED_NAME_EDEFAULT == null |
| ? getQualifiedName() != null |
| : !QUALIFIED_NAME_EDEFAULT.equals(getQualifiedName()); |
| case UMLPackage.REDEFINABLE_ELEMENT__VISIBILITY : |
| return isSetVisibility(); |
| case UMLPackage.REDEFINABLE_ELEMENT__IS_LEAF : |
| return ((eFlags & IS_LEAF_EFLAG) != 0) != IS_LEAF_EDEFAULT; |
| case UMLPackage.REDEFINABLE_ELEMENT__REDEFINED_ELEMENT : |
| return isSetRedefinedElements(); |
| case UMLPackage.REDEFINABLE_ELEMENT__REDEFINITION_CONTEXT : |
| return isSetRedefinitionContexts(); |
| } |
| return eDynamicIsSet(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| @SuppressWarnings("unchecked") |
| public Object eInvoke(int operationID, EList<?> arguments) |
| throws InvocationTargetException { |
| switch (operationID) { |
| case UMLPackage.REDEFINABLE_ELEMENT___GET_EANNOTATION__STRING : |
| return getEAnnotation((String) arguments.get(0)); |
| case UMLPackage.REDEFINABLE_ELEMENT___VALIDATE_HAS_OWNER__DIAGNOSTICCHAIN_MAP : |
| return validateHasOwner((DiagnosticChain) arguments.get(0), |
| (Map<Object, Object>) arguments.get(1)); |
| case UMLPackage.REDEFINABLE_ELEMENT___VALIDATE_NOT_OWN_SELF__DIAGNOSTICCHAIN_MAP : |
| return validateNotOwnSelf((DiagnosticChain) arguments.get(0), |
| (Map<Object, Object>) arguments.get(1)); |
| case UMLPackage.REDEFINABLE_ELEMENT___ADD_KEYWORD__STRING : |
| return addKeyword((String) arguments.get(0)); |
| case UMLPackage.REDEFINABLE_ELEMENT___APPLY_STEREOTYPE__STEREOTYPE : |
| return applyStereotype((Stereotype) arguments.get(0)); |
| case UMLPackage.REDEFINABLE_ELEMENT___CREATE_EANNOTATION__STRING : |
| return createEAnnotation((String) arguments.get(0)); |
| case UMLPackage.REDEFINABLE_ELEMENT___DESTROY : |
| destroy(); |
| return null; |
| case UMLPackage.REDEFINABLE_ELEMENT___GET_KEYWORDS : |
| return getKeywords(); |
| case UMLPackage.REDEFINABLE_ELEMENT___GET_APPLICABLE_STEREOTYPE__STRING : |
| return getApplicableStereotype((String) arguments.get(0)); |
| case UMLPackage.REDEFINABLE_ELEMENT___GET_APPLICABLE_STEREOTYPES : |
| return getApplicableStereotypes(); |
| case UMLPackage.REDEFINABLE_ELEMENT___GET_APPLIED_STEREOTYPE__STRING : |
| return getAppliedStereotype((String) arguments.get(0)); |
| case UMLPackage.REDEFINABLE_ELEMENT___GET_APPLIED_STEREOTYPES : |
| return getAppliedStereotypes(); |
| case UMLPackage.REDEFINABLE_ELEMENT___GET_APPLIED_SUBSTEREOTYPE__STEREOTYPE_STRING : |
| return getAppliedSubstereotype((Stereotype) arguments.get(0), |
| (String) arguments.get(1)); |
| case UMLPackage.REDEFINABLE_ELEMENT___GET_APPLIED_SUBSTEREOTYPES__STEREOTYPE : |
| return getAppliedSubstereotypes((Stereotype) arguments.get(0)); |
| case UMLPackage.REDEFINABLE_ELEMENT___GET_MODEL : |
| return getModel(); |
| case UMLPackage.REDEFINABLE_ELEMENT___GET_NEAREST_PACKAGE : |
| return getNearestPackage(); |
| case UMLPackage.REDEFINABLE_ELEMENT___GET_RELATIONSHIPS : |
| return getRelationships(); |
| case UMLPackage.REDEFINABLE_ELEMENT___GET_RELATIONSHIPS__ECLASS : |
| return getRelationships((EClass) arguments.get(0)); |
| case UMLPackage.REDEFINABLE_ELEMENT___GET_REQUIRED_STEREOTYPE__STRING : |
| return getRequiredStereotype((String) arguments.get(0)); |
| case UMLPackage.REDEFINABLE_ELEMENT___GET_REQUIRED_STEREOTYPES : |
| return getRequiredStereotypes(); |
| case UMLPackage.REDEFINABLE_ELEMENT___GET_SOURCE_DIRECTED_RELATIONSHIPS : |
| return getSourceDirectedRelationships(); |
| case UMLPackage.REDEFINABLE_ELEMENT___GET_SOURCE_DIRECTED_RELATIONSHIPS__ECLASS : |
| return getSourceDirectedRelationships((EClass) arguments.get(0)); |
| case UMLPackage.REDEFINABLE_ELEMENT___GET_STEREOTYPE_APPLICATION__STEREOTYPE : |
| return getStereotypeApplication((Stereotype) arguments.get(0)); |
| case UMLPackage.REDEFINABLE_ELEMENT___GET_STEREOTYPE_APPLICATIONS : |
| return getStereotypeApplications(); |
| case UMLPackage.REDEFINABLE_ELEMENT___GET_TARGET_DIRECTED_RELATIONSHIPS : |
| return getTargetDirectedRelationships(); |
| case UMLPackage.REDEFINABLE_ELEMENT___GET_TARGET_DIRECTED_RELATIONSHIPS__ECLASS : |
| return getTargetDirectedRelationships((EClass) arguments.get(0)); |
| case UMLPackage.REDEFINABLE_ELEMENT___GET_VALUE__STEREOTYPE_STRING : |
| return getValue((Stereotype) arguments.get(0), |
| (String) arguments.get(1)); |
| case UMLPackage.REDEFINABLE_ELEMENT___HAS_KEYWORD__STRING : |
| return hasKeyword((String) arguments.get(0)); |
| case UMLPackage.REDEFINABLE_ELEMENT___HAS_VALUE__STEREOTYPE_STRING : |
| return hasValue((Stereotype) arguments.get(0), |
| (String) arguments.get(1)); |
| case UMLPackage.REDEFINABLE_ELEMENT___IS_STEREOTYPE_APPLICABLE__STEREOTYPE : |
| return isStereotypeApplicable((Stereotype) arguments.get(0)); |
| case UMLPackage.REDEFINABLE_ELEMENT___IS_STEREOTYPE_APPLIED__STEREOTYPE : |
| return isStereotypeApplied((Stereotype) arguments.get(0)); |
| case UMLPackage.REDEFINABLE_ELEMENT___IS_STEREOTYPE_REQUIRED__STEREOTYPE : |
| return isStereotypeRequired((Stereotype) arguments.get(0)); |
| case UMLPackage.REDEFINABLE_ELEMENT___REMOVE_KEYWORD__STRING : |
| return removeKeyword((String) arguments.get(0)); |
| case UMLPackage.REDEFINABLE_ELEMENT___SET_VALUE__STEREOTYPE_STRING_OBJECT : |
| setValue((Stereotype) arguments.get(0), |
| (String) arguments.get(1), arguments.get(2)); |
| return null; |
| case UMLPackage.REDEFINABLE_ELEMENT___UNAPPLY_STEREOTYPE__STEREOTYPE : |
| return unapplyStereotype((Stereotype) arguments.get(0)); |
| case UMLPackage.REDEFINABLE_ELEMENT___ALL_OWNED_ELEMENTS : |
| return allOwnedElements(); |
| case UMLPackage.REDEFINABLE_ELEMENT___MUST_BE_OWNED : |
| return mustBeOwned(); |
| case UMLPackage.REDEFINABLE_ELEMENT___VALIDATE_HAS_QUALIFIED_NAME__DIAGNOSTICCHAIN_MAP : |
| return validateHasQualifiedName( |
| (DiagnosticChain) arguments.get(0), |
| (Map<Object, Object>) arguments.get(1)); |
| case UMLPackage.REDEFINABLE_ELEMENT___VALIDATE_HAS_NO_QUALIFIED_NAME__DIAGNOSTICCHAIN_MAP : |
| return validateHasNoQualifiedName( |
| (DiagnosticChain) arguments.get(0), |
| (Map<Object, Object>) arguments.get(1)); |
| case UMLPackage.REDEFINABLE_ELEMENT___VALIDATE_VISIBILITY_NEEDS_OWNERSHIP__DIAGNOSTICCHAIN_MAP : |
| return validateVisibilityNeedsOwnership( |
| (DiagnosticChain) arguments.get(0), |
| (Map<Object, Object>) arguments.get(1)); |
| case UMLPackage.REDEFINABLE_ELEMENT___CREATE_DEPENDENCY__NAMEDELEMENT : |
| return createDependency((NamedElement) arguments.get(0)); |
| case UMLPackage.REDEFINABLE_ELEMENT___CREATE_USAGE__NAMEDELEMENT : |
| return createUsage((NamedElement) arguments.get(0)); |
| case UMLPackage.REDEFINABLE_ELEMENT___GET_LABEL : |
| return getLabel(); |
| case UMLPackage.REDEFINABLE_ELEMENT___GET_LABEL__BOOLEAN : |
| return getLabel((Boolean) arguments.get(0)); |
| case UMLPackage.REDEFINABLE_ELEMENT___ALL_NAMESPACES : |
| return allNamespaces(); |
| case UMLPackage.REDEFINABLE_ELEMENT___ALL_OWNING_PACKAGES : |
| return allOwningPackages(); |
| case UMLPackage.REDEFINABLE_ELEMENT___IS_DISTINGUISHABLE_FROM__NAMEDELEMENT_NAMESPACE : |
| return isDistinguishableFrom((NamedElement) arguments.get(0), |
| (Namespace) arguments.get(1)); |
| case UMLPackage.REDEFINABLE_ELEMENT___GET_NAMESPACE : |
| return getNamespace(); |
| case UMLPackage.REDEFINABLE_ELEMENT___GET_QUALIFIED_NAME : |
| return getQualifiedName(); |
| case UMLPackage.REDEFINABLE_ELEMENT___SEPARATOR : |
| return separator(); |
| case UMLPackage.REDEFINABLE_ELEMENT___VALIDATE_REDEFINITION_CONSISTENT__DIAGNOSTICCHAIN_MAP : |
| return validateRedefinitionConsistent( |
| (DiagnosticChain) arguments.get(0), |
| (Map<Object, Object>) arguments.get(1)); |
| case UMLPackage.REDEFINABLE_ELEMENT___VALIDATE_NON_LEAF_REDEFINITION__DIAGNOSTICCHAIN_MAP : |
| return validateNonLeafRedefinition( |
| (DiagnosticChain) arguments.get(0), |
| (Map<Object, Object>) arguments.get(1)); |
| case UMLPackage.REDEFINABLE_ELEMENT___VALIDATE_REDEFINITION_CONTEXT_VALID__DIAGNOSTICCHAIN_MAP : |
| return validateRedefinitionContextValid( |
| (DiagnosticChain) arguments.get(0), |
| (Map<Object, Object>) arguments.get(1)); |
| case UMLPackage.REDEFINABLE_ELEMENT___IS_CONSISTENT_WITH__REDEFINABLEELEMENT : |
| return isConsistentWith((RedefinableElement) arguments.get(0)); |
| case UMLPackage.REDEFINABLE_ELEMENT___IS_REDEFINITION_CONTEXT_VALID__REDEFINABLEELEMENT : |
| return isRedefinitionContextValid((RedefinableElement) arguments |
| .get(0)); |
| } |
| return eDynamicInvoke(operationID, arguments); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isConsistentWith(RedefinableElement redefinee) { |
| return RedefinableElementOperations.isConsistentWith(this, redefinee); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| 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(')'); |
| 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 getOwner() instanceof Classifier; |
| } |
| |
| } //RedefinableElementImpl |