| /* |
| * Copyright (c) 2014, 2018 CEA and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v2.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v20.html |
| * |
| * Contributors: |
| * Kenn Hussey (CEA) - initial API and implementation |
| * Kenn Hussey (CEA) - 451350 |
| * Kenn Hussey - 535301 |
| * |
| */ |
| package org.eclipse.uml2.uml.profile.standard.cdo; |
| |
| import java.lang.reflect.InvocationTargetException; |
| import java.util.Map; |
| |
| import org.eclipse.emf.common.util.DiagnosticChain; |
| import org.eclipse.emf.common.util.EList; |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.internal.cdo.CDOObjectImpl; |
| import org.eclipse.uml2.uml.Usage; |
| import org.eclipse.uml2.uml.profile.standard.Instantiate; |
| import org.eclipse.uml2.uml.profile.standard.StandardPackage; |
| import org.eclipse.uml2.uml.profile.standard.internal.operations.InstantiateOperations; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Instantiate</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.uml2.uml.profile.standard.cdo.InstantiateImpl#getBase_Usage <em>Base Usage</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class InstantiateImpl extends CDOObjectImpl implements Instantiate { |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected InstantiateImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return StandardPackage.Literals.INSTANTIATE; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected int eStaticFeatureCount() { |
| return 0; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Usage getBase_Usage() { |
| return (Usage) eDynamicGet(StandardPackage.INSTANTIATE__BASE_USAGE, |
| StandardPackage.Literals.INSTANTIATE__BASE_USAGE, true, true); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Usage basicGetBase_Usage() { |
| return (Usage) eDynamicGet(StandardPackage.INSTANTIATE__BASE_USAGE, |
| StandardPackage.Literals.INSTANTIATE__BASE_USAGE, false, true); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setBase_Usage(Usage newBase_Usage) { |
| eDynamicSet(StandardPackage.INSTANTIATE__BASE_USAGE, StandardPackage.Literals.INSTANTIATE__BASE_USAGE, |
| newBase_Usage); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean validateClientAndSupplierAreClassifiers(DiagnosticChain diagnostics, Map<Object, Object> context) { |
| return InstantiateOperations.validateClientAndSupplierAreClassifiers(this, diagnostics, context); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case StandardPackage.INSTANTIATE__BASE_USAGE: |
| if (resolve) |
| return getBase_Usage(); |
| return basicGetBase_Usage(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case StandardPackage.INSTANTIATE__BASE_USAGE: |
| setBase_Usage((Usage) newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case StandardPackage.INSTANTIATE__BASE_USAGE: |
| setBase_Usage((Usage) null); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case StandardPackage.INSTANTIATE__BASE_USAGE: |
| return basicGetBase_Usage() != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| @SuppressWarnings("unchecked") |
| public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { |
| switch (operationID) { |
| case StandardPackage.INSTANTIATE___VALIDATE_CLIENT_AND_SUPPLIER_ARE_CLASSIFIERS__DIAGNOSTICCHAIN_MAP: |
| return validateClientAndSupplierAreClassifiers((DiagnosticChain) arguments.get(0), |
| (Map<Object, Object>) arguments.get(1)); |
| } |
| return super.eInvoke(operationID, arguments); |
| } |
| |
| } //InstantiateImpl |