| /* |
| * Copyright (c) 2019 Ed Merks 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: |
| * Ed Merks - initial API and implementation |
| */ |
| package org.eclipse.oomph.junit; |
| |
| import org.eclipse.emf.common.notify.NotificationChain; |
| import org.eclipse.emf.common.util.EList; |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.InternalEObject; |
| import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; |
| import org.eclipse.emf.ecore.util.EObjectContainmentEList; |
| import org.eclipse.emf.ecore.util.InternalEList; |
| |
| import java.util.Collection; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * A representation of the model object '<em><b>Properties Type</b></em>'. |
| * <!-- end-user-doc --> |
| * |
| * <p> |
| * The following features are supported: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.oomph.junit.PropertiesType#getProperty <em>Property</em>}</li> |
| * </ul> |
| * |
| * @see org.eclipse.oomph.junit.JUnitPackage#getPropertiesType() |
| * @model kind="class" |
| * extendedMetaData="name='properties_._type' kind='elementOnly'" |
| * @generated |
| */ |
| public class PropertiesType extends MinimalEObjectImpl.Container |
| { |
| /** |
| * The cached value of the '{@link #getProperty() <em>Property</em>}' containment reference list. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getProperty() |
| * @generated |
| * @ordered |
| */ |
| protected EList<PropertyType> property; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected PropertiesType() |
| { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() |
| { |
| return JUnitPackage.Literals.PROPERTIES_TYPE; |
| } |
| |
| /** |
| * Returns the value of the '<em><b>Property</b></em>' containment reference list. |
| * The list contents are of type {@link org.eclipse.oomph.junit.PropertyType}. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @return the value of the '<em>Property</em>' containment reference list. |
| * @see org.eclipse.oomph.junit.JUnitPackage#getPropertiesType_Property() |
| * @model containment="true" |
| * extendedMetaData="kind='element' name='property' namespace='##targetNamespace'" |
| * @generated |
| */ |
| public EList<PropertyType> getProperty() |
| { |
| if (property == null) |
| { |
| property = new EObjectContainmentEList<PropertyType>(PropertyType.class, this, JUnitPackage.PROPERTIES_TYPE__PROPERTY); |
| } |
| return property; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) |
| { |
| switch (featureID) |
| { |
| case JUnitPackage.PROPERTIES_TYPE__PROPERTY: |
| return ((InternalEList<?>)getProperty()).basicRemove(otherEnd, msgs); |
| } |
| return super.eInverseRemove(otherEnd, featureID, msgs); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) |
| { |
| switch (featureID) |
| { |
| case JUnitPackage.PROPERTIES_TYPE__PROPERTY: |
| return getProperty(); |
| } |
| 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 JUnitPackage.PROPERTIES_TYPE__PROPERTY: |
| getProperty().clear(); |
| getProperty().addAll((Collection<? extends PropertyType>)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) |
| { |
| switch (featureID) |
| { |
| case JUnitPackage.PROPERTIES_TYPE__PROPERTY: |
| getProperty().clear(); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) |
| { |
| switch (featureID) |
| { |
| case JUnitPackage.PROPERTIES_TYPE__PROPERTY: |
| return property != null && !property.isEmpty(); |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } // PropertiesType |