kieker.analysis.model.analysisMetaModel.impl.MInputPort Maven / Gradle / Ivy
/**
*/
package kieker.analysis.model.analysisMetaModel.impl;
import kieker.analysis.model.analysisMetaModel.MIAnalysisMetaModelPackage;
import kieker.analysis.model.analysisMetaModel.MIFilter;
import kieker.analysis.model.analysisMetaModel.MIInputPort;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
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.EcoreUtil;
/**
*
* An implementation of the model object 'Input Port'.
*
*
* The following features are implemented:
*
* - {@link kieker.analysis.model.analysisMetaModel.impl.MInputPort#getParent Parent}
*
*
*
* @generated
*/
public class MInputPort extends MPort implements MIInputPort {
/**
*
*
* @generated
*/
protected MInputPort() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return MIAnalysisMetaModelPackage.Literals.INPUT_PORT;
}
/**
*
*
* @generated
*/
public MIFilter getParent() {
if (eContainerFeatureID() != MIAnalysisMetaModelPackage.INPUT_PORT__PARENT) return null;
return (MIFilter)eContainer();
}
/**
*
*
* @generated
*/
public NotificationChain basicSetParent(MIFilter newParent, NotificationChain msgs) {
msgs = eBasicSetContainer((InternalEObject)newParent, MIAnalysisMetaModelPackage.INPUT_PORT__PARENT, msgs);
return msgs;
}
/**
*
*
* @generated
*/
public void setParent(MIFilter newParent) {
if (newParent != eInternalContainer() || (eContainerFeatureID() != MIAnalysisMetaModelPackage.INPUT_PORT__PARENT && newParent != null)) {
if (EcoreUtil.isAncestor(this, newParent))
throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
NotificationChain msgs = null;
if (eInternalContainer() != null)
msgs = eBasicRemoveFromContainer(msgs);
if (newParent != null)
msgs = ((InternalEObject)newParent).eInverseAdd(this, MIAnalysisMetaModelPackage.FILTER__INPUT_PORTS, MIFilter.class, msgs);
msgs = basicSetParent(newParent, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, MIAnalysisMetaModelPackage.INPUT_PORT__PARENT, newParent, newParent));
}
/**
*
*
* @generated
*/
@Override
public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case MIAnalysisMetaModelPackage.INPUT_PORT__PARENT:
if (eInternalContainer() != null)
msgs = eBasicRemoveFromContainer(msgs);
return basicSetParent((MIFilter)otherEnd, msgs);
}
return super.eInverseAdd(otherEnd, featureID, msgs);
}
/**
*
*
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case MIAnalysisMetaModelPackage.INPUT_PORT__PARENT:
return basicSetParent(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
*
*
* @generated
*/
@Override
public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
switch (eContainerFeatureID()) {
case MIAnalysisMetaModelPackage.INPUT_PORT__PARENT:
return eInternalContainer().eInverseRemove(this, MIAnalysisMetaModelPackage.FILTER__INPUT_PORTS, MIFilter.class, msgs);
}
return super.eBasicRemoveFromContainerFeature(msgs);
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case MIAnalysisMetaModelPackage.INPUT_PORT__PARENT:
return getParent();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case MIAnalysisMetaModelPackage.INPUT_PORT__PARENT:
setParent((MIFilter)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case MIAnalysisMetaModelPackage.INPUT_PORT__PARENT:
setParent((MIFilter)null);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case MIAnalysisMetaModelPackage.INPUT_PORT__PARENT:
return getParent() != null;
}
return super.eIsSet(featureID);
}
} //MInputPort