diff options
Diffstat (limited to 'plugins/org.eclipse.m2m.atl.common/src/org/eclipse/m2m/atl/common/ATL/Library.java')
-rw-r--r-- | plugins/org.eclipse.m2m.atl.common/src/org/eclipse/m2m/atl/common/ATL/Library.java | 184 |
1 files changed, 184 insertions, 0 deletions
diff --git a/plugins/org.eclipse.m2m.atl.common/src/org/eclipse/m2m/atl/common/ATL/Library.java b/plugins/org.eclipse.m2m.atl.common/src/org/eclipse/m2m/atl/common/ATL/Library.java new file mode 100644 index 00000000..c6b62228 --- /dev/null +++ b/plugins/org.eclipse.m2m.atl.common/src/org/eclipse/m2m/atl/common/ATL/Library.java @@ -0,0 +1,184 @@ +/** + * Copyright (c) 2008, 2012, 2015 Obeo. + * 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: + * Obeo - initial API and implementation + * Dennis Wagelaar (Vrije Universiteit Brussel) + */ +package org.eclipse.m2m.atl.common.ATL; + +import java.util.Collection; + +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.util.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Library</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link org.eclipse.m2m.atl.common.ATL.Library#getHelpers <em>Helpers</em>}</li> + * </ul> + * + * @see org.eclipse.m2m.atl.common.ATL.ATLPackage#getLibrary() + * @model kind="class" + * @generated + */ +public class Library extends Unit { + /** + * The cached value of the '{@link #getHelpers() <em>Helpers</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getHelpers() + * @generated + * @ordered + */ + protected EList<Helper> helpers; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected Library() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ATLPackage.Literals.LIBRARY; + } + + /** + * Returns the value of the '<em><b>Helpers</b></em>' containment reference list. + * The list contents are of type {@link org.eclipse.m2m.atl.common.ATL.Helper}. + * It is bidirectional and its opposite is '{@link org.eclipse.m2m.atl.common.ATL.Helper#getLibrary <em>Library</em>}'. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Helpers</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Helpers</em>' containment reference list. + * @see org.eclipse.m2m.atl.common.ATL.ATLPackage#getLibrary_Helpers() + * @see org.eclipse.m2m.atl.common.ATL.Helper#getLibrary + * @model opposite="library" containment="true" + * @generated + */ + public EList<Helper> getHelpers() { + if (helpers == null) { + helpers = new EObjectContainmentWithInverseEList<Helper>(Helper.class, this, ATLPackage.LIBRARY__HELPERS, ATLPackage.HELPER__LIBRARY); + } + return helpers; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ATLPackage.LIBRARY__HELPERS: + return ((InternalEList<InternalEObject>)(InternalEList<?>)getHelpers()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ATLPackage.LIBRARY__HELPERS: + return ((InternalEList<?>)getHelpers()).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 ATLPackage.LIBRARY__HELPERS: + return getHelpers(); + } + 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 ATLPackage.LIBRARY__HELPERS: + getHelpers().clear(); + getHelpers().addAll((Collection<? extends Helper>)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ATLPackage.LIBRARY__HELPERS: + getHelpers().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ATLPackage.LIBRARY__HELPERS: + return helpers != null && !helpers.isEmpty(); + } + return super.eIsSet(featureID); + } + +} // Library |