All Downloads are FREE. Search and download functionalities are using the official Maven repository.

sculptormetamodel.impl.ApplicationImpl Maven / Gradle / Ivy

/**
 */
package sculptormetamodel.impl;

import java.util.Collection;

import org.eclipse.emf.common.notify.Notification;
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.ENotificationImpl;

import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
import org.eclipse.emf.ecore.util.InternalEList;

import sculptormetamodel.Application;
import sculptormetamodel.Module;
import sculptormetamodel.SculptormetamodelPackage;

/**
 * 
 * An implementation of the model object 'Application'.
 * 
 * 

* The following features are implemented: *

    *
  • {@link sculptormetamodel.impl.ApplicationImpl#getBasePackage Base Package}
  • *
  • {@link sculptormetamodel.impl.ApplicationImpl#getModules Modules}
  • *
*

* * @generated */ public class ApplicationImpl extends NamedElementImpl implements Application { /** * The default value of the '{@link #getBasePackage() Base Package}' attribute. * * * @see #getBasePackage() * @generated * @ordered */ protected static final String BASE_PACKAGE_EDEFAULT = null; /** * The cached value of the '{@link #getBasePackage() Base Package}' attribute. * * * @see #getBasePackage() * @generated * @ordered */ protected String basePackage = BASE_PACKAGE_EDEFAULT; /** * The cached value of the '{@link #getModules() Modules}' containment reference list. * * * @see #getModules() * @generated * @ordered */ protected EList modules; /** * * * @generated */ protected ApplicationImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return SculptormetamodelPackage.Literals.APPLICATION; } /** * * * @generated */ public String getBasePackage() { return basePackage; } /** * * * @generated */ public void setBasePackage(String newBasePackage) { String oldBasePackage = basePackage; basePackage = newBasePackage; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, SculptormetamodelPackage.APPLICATION__BASE_PACKAGE, oldBasePackage, basePackage)); } /** * * * @generated */ public EList getModules() { if (modules == null) { modules = new EObjectContainmentWithInverseEList(Module.class, this, SculptormetamodelPackage.APPLICATION__MODULES, SculptormetamodelPackage.MODULE__APPLICATION); } return modules; } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case SculptormetamodelPackage.APPLICATION__MODULES: return ((InternalEList)(InternalEList)getModules()).basicAdd(otherEnd, msgs); } return super.eInverseAdd(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case SculptormetamodelPackage.APPLICATION__MODULES: return ((InternalEList)getModules()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case SculptormetamodelPackage.APPLICATION__BASE_PACKAGE: return getBasePackage(); case SculptormetamodelPackage.APPLICATION__MODULES: return getModules(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case SculptormetamodelPackage.APPLICATION__BASE_PACKAGE: setBasePackage((String)newValue); return; case SculptormetamodelPackage.APPLICATION__MODULES: getModules().clear(); getModules().addAll((Collection)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case SculptormetamodelPackage.APPLICATION__BASE_PACKAGE: setBasePackage(BASE_PACKAGE_EDEFAULT); return; case SculptormetamodelPackage.APPLICATION__MODULES: getModules().clear(); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case SculptormetamodelPackage.APPLICATION__BASE_PACKAGE: return BASE_PACKAGE_EDEFAULT == null ? basePackage != null : !BASE_PACKAGE_EDEFAULT.equals(basePackage); case SculptormetamodelPackage.APPLICATION__MODULES: return modules != null && !modules.isEmpty(); } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (basePackage: "); result.append(basePackage); result.append(')'); return result.toString(); } } //ApplicationImpl




© 2015 - 2025 Weber Informatics LLC | Privacy Policy