diff options
Diffstat (limited to 'plugins/facet/org.eclipse.papyrus.emf.facet.efacet.metamodel/src-gen/org/eclipse/papyrus/emf/facet/efacet/metamodel/v0_2_0/efacet/runtime/impl/ETypedElementPrimitiveTypeListResultImpl.java')
1 files changed, 174 insertions, 0 deletions
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.metamodel/src-gen/org/eclipse/papyrus/emf/facet/efacet/metamodel/v0_2_0/efacet/runtime/impl/ETypedElementPrimitiveTypeListResultImpl.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.metamodel/src-gen/org/eclipse/papyrus/emf/facet/efacet/metamodel/v0_2_0/efacet/runtime/impl/ETypedElementPrimitiveTypeListResultImpl.java new file mode 100644 index 00000000000..ca48ce1a648 --- /dev/null +++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.metamodel/src-gen/org/eclipse/papyrus/emf/facet/efacet/metamodel/v0_2_0/efacet/runtime/impl/ETypedElementPrimitiveTypeListResultImpl.java @@ -0,0 +1,174 @@ +/** + * Copyright (c) 2011, 2012 Mia-Software. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Gregoire Dupe (Mia-Software) - Design + * Nicolas Guyomar (Mia-Software) - Implementation + * Emmanuelle Rouillé (Mia-Software) - Bug 352618 - To be able to use non derived facet structural features and save them values. + * Nicolas Bros (Mia-Software) - Bug 361823 - [Restructuring] eFacet2 meta-model + * Gregoire Dupe (Mia-Software) - Bug 366055 - NavigationQuery + * Gregoire Dupe (Mia-Software) - Bug 369673 - [Facet] IsOneOfQuery + * Olivier Remaud (Soft-Maint) - Bug 369824 - Add a simple way to return string literal constants from a customization query + * Gregoire Dupe (Mia-software) - Bug 369987 - [Restructuring][Table] Switch to the new customization and facet framework + * Gregoire Dupe (Mia-software) - Bug 364325 - [Restructuring] The user must be able to navigate into a model using the Facet. + */ +package org.eclipse.papyrus.emf.facet.efacet.metamodel.v0_2_0.efacet.runtime.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.util.EDataTypeUniqueEList; +import org.eclipse.papyrus.emf.facet.efacet.metamodel.v0_2_0.efacet.runtime.ETypedElementPrimitiveTypeListResult; +import org.eclipse.papyrus.emf.facet.efacet.metamodel.v0_2_0.efacet.runtime.RuntimePackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>ETyped Element Primitive Type List Result</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.papyrus.emf.facet.efacet.metamodel.v0_2_0.efacet.runtime.impl.ETypedElementPrimitiveTypeListResultImpl#getResultList <em>Result List</em>}</li> + * </ul> + * + * @generated + */ +public class ETypedElementPrimitiveTypeListResultImpl<T> extends ETypedElementResultImpl implements ETypedElementPrimitiveTypeListResult<T> { + /** + * The cached value of the '{@link #getResultList() <em>Result List</em>}' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #getResultList() + * @generated + * @ordered + */ + protected EList<T> resultList; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected ETypedElementPrimitiveTypeListResultImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return RuntimePackage.Literals.ETYPED_ELEMENT_PRIMITIVE_TYPE_LIST_RESULT; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public EList<T> getResultList() { + if (resultList == null) { + resultList = new EDataTypeUniqueEList<T>(Object.class, this, RuntimePackage.ETYPED_ELEMENT_PRIMITIVE_TYPE_LIST_RESULT__RESULT_LIST); + } + return resultList; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case RuntimePackage.ETYPED_ELEMENT_PRIMITIVE_TYPE_LIST_RESULT__RESULT_LIST: + return getResultList(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case RuntimePackage.ETYPED_ELEMENT_PRIMITIVE_TYPE_LIST_RESULT__RESULT_LIST: + getResultList().clear(); + getResultList().addAll((Collection<? extends T>) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case RuntimePackage.ETYPED_ELEMENT_PRIMITIVE_TYPE_LIST_RESULT__RESULT_LIST: + getResultList().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case RuntimePackage.ETYPED_ELEMENT_PRIMITIVE_TYPE_LIST_RESULT__RESULT_LIST: + return resultList != null && !resultList.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) { + return super.toString(); + } + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (resultList: "); //$NON-NLS-1$ + result.append(resultList); + result.append(')'); + return result.toString(); + } + +} // ETypedElementPrimitiveTypeListResultImpl |