
kieker.model.analysismodel.deployment.impl.DeployedComponentImpl Maven / Gradle / Ivy
/**
*/
package kieker.model.analysismodel.deployment.impl;
import java.lang.reflect.InvocationTargetException;
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.common.util.EMap;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.EObjectResolvingEList;
import org.eclipse.emf.ecore.util.EcoreEMap;
import org.eclipse.emf.ecore.util.InternalEList;
import kieker.model.analysismodel.assembly.AssemblyComponent;
import kieker.model.analysismodel.deployment.DeployedComponent;
import kieker.model.analysismodel.deployment.DeployedOperation;
import kieker.model.analysismodel.deployment.DeployedProvidedInterface;
import kieker.model.analysismodel.deployment.DeployedRequiredInterface;
import kieker.model.analysismodel.deployment.DeployedStorage;
import kieker.model.analysismodel.deployment.DeploymentContext;
import kieker.model.analysismodel.deployment.DeploymentPackage;
/**
*
* An implementation of the model object 'Deployed Component'.
*
*
* The following features are implemented:
*
*
* - {@link kieker.model.analysismodel.deployment.impl.DeployedComponentImpl#getAssemblyComponent Assembly Component}
* - {@link kieker.model.analysismodel.deployment.impl.DeployedComponentImpl#getOperations Operations}
* - {@link kieker.model.analysismodel.deployment.impl.DeployedComponentImpl#getStorages Storages}
* - {@link kieker.model.analysismodel.deployment.impl.DeployedComponentImpl#getContainedComponents Contained Components}
* - {@link kieker.model.analysismodel.deployment.impl.DeployedComponentImpl#getProvidedInterfaces Provided Interfaces}
* - {@link kieker.model.analysismodel.deployment.impl.DeployedComponentImpl#getRequiredInterfaces Required Interfaces}
* - {@link kieker.model.analysismodel.deployment.impl.DeployedComponentImpl#getSignature Signature}
*
*
* @generated
*/
public class DeployedComponentImpl extends MinimalEObjectImpl.Container implements DeployedComponent {
/**
* The cached value of the '{@link #getAssemblyComponent() Assembly Component}' reference.
*
*
*
* @see #getAssemblyComponent()
* @generated
* @ordered
*/
protected AssemblyComponent assemblyComponent;
/**
* The cached value of the '{@link #getOperations() Operations}' map.
*
*
*
* @see #getOperations()
* @generated
* @ordered
*/
protected EMap operations;
/**
* The cached value of the '{@link #getStorages() Storages}' map.
*
*
*
* @see #getStorages()
* @generated
* @ordered
*/
protected EMap storages;
/**
* The cached value of the '{@link #getContainedComponents() Contained Components}' reference list.
*
*
*
* @see #getContainedComponents()
* @generated
* @ordered
*/
protected EList containedComponents;
/**
* The cached value of the '{@link #getProvidedInterfaces() Provided Interfaces}' map.
*
*
*
* @see #getProvidedInterfaces()
* @generated
* @ordered
*/
protected EMap providedInterfaces;
/**
* The cached value of the '{@link #getRequiredInterfaces() Required Interfaces}' containment reference list.
*
*
*
* @see #getRequiredInterfaces()
* @generated
* @ordered
*/
protected EList requiredInterfaces;
/**
* The default value of the '{@link #getSignature() Signature}' attribute.
*
*
*
* @see #getSignature()
* @generated
* @ordered
*/
protected static final String SIGNATURE_EDEFAULT = null;
/**
* The cached value of the '{@link #getSignature() Signature}' attribute.
*
*
*
* @see #getSignature()
* @generated
* @ordered
*/
protected String signature = SIGNATURE_EDEFAULT;
/**
*
*
*
* @generated
*/
protected DeployedComponentImpl() {
super();
}
/**
*
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return DeploymentPackage.Literals.DEPLOYED_COMPONENT;
}
/**
*
*
*
* @generated
*/
@Override
public AssemblyComponent getAssemblyComponent() {
if ((this.assemblyComponent != null) && this.assemblyComponent.eIsProxy()) {
final InternalEObject oldAssemblyComponent = (InternalEObject) this.assemblyComponent;
this.assemblyComponent = (AssemblyComponent) this.eResolveProxy(oldAssemblyComponent);
if (this.assemblyComponent != oldAssemblyComponent) {
if (this.eNotificationRequired()) {
this.eNotify(new ENotificationImpl(this, Notification.RESOLVE, DeploymentPackage.DEPLOYED_COMPONENT__ASSEMBLY_COMPONENT, oldAssemblyComponent,
this.assemblyComponent));
}
}
}
return this.assemblyComponent;
}
/**
*
*
*
* @generated
*/
public AssemblyComponent basicGetAssemblyComponent() {
return this.assemblyComponent;
}
/**
*
*
*
* @generated
*/
@Override
public void setAssemblyComponent(final AssemblyComponent newAssemblyComponent) {
final AssemblyComponent oldAssemblyComponent = this.assemblyComponent;
this.assemblyComponent = newAssemblyComponent;
if (this.eNotificationRequired()) {
this.eNotify(new ENotificationImpl(this, Notification.SET, DeploymentPackage.DEPLOYED_COMPONENT__ASSEMBLY_COMPONENT, oldAssemblyComponent,
this.assemblyComponent));
}
}
/**
*
*
*
* @generated
*/
@Override
public EMap getOperations() {
if (this.operations == null) {
this.operations = new EcoreEMap<>(DeploymentPackage.Literals.ESTRING_TO_DEPLOYED_OPERATION_MAP_ENTRY,
EStringToDeployedOperationMapEntryImpl.class, this, DeploymentPackage.DEPLOYED_COMPONENT__OPERATIONS);
}
return this.operations;
}
/**
*
*
*
* @generated
*/
@Override
public EMap getStorages() {
if (this.storages == null) {
this.storages = new EcoreEMap<>(DeploymentPackage.Literals.ESTRING_TO_DEPLOYED_STORAGE_MAP_ENTRY,
EStringToDeployedStorageMapEntryImpl.class, this, DeploymentPackage.DEPLOYED_COMPONENT__STORAGES);
}
return this.storages;
}
/**
*
*
*
* @generated
*/
@Override
public EList getContainedComponents() {
if (this.containedComponents == null) {
this.containedComponents = new EObjectResolvingEList<>(DeployedComponent.class, this,
DeploymentPackage.DEPLOYED_COMPONENT__CONTAINED_COMPONENTS);
}
return this.containedComponents;
}
/**
*
*
*
* @generated
*/
@Override
public EMap getProvidedInterfaces() {
if (this.providedInterfaces == null) {
this.providedInterfaces = new EcoreEMap<>(DeploymentPackage.Literals.ESTRING_TO_DEPLOYED_PROVIDED_INTERFACE_MAP_ENTRY,
EStringToDeployedProvidedInterfaceMapEntryImpl.class, this, DeploymentPackage.DEPLOYED_COMPONENT__PROVIDED_INTERFACES);
}
return this.providedInterfaces;
}
/**
*
*
*
* @generated
*/
@Override
public EList getRequiredInterfaces() {
if (this.requiredInterfaces == null) {
this.requiredInterfaces = new EObjectContainmentEList<>(DeployedRequiredInterface.class, this,
DeploymentPackage.DEPLOYED_COMPONENT__REQUIRED_INTERFACES);
}
return this.requiredInterfaces;
}
/**
*
*
*
* @generated
*/
@Override
public String getSignature() {
return this.signature;
}
/**
*
*
*
* @generated
*/
@Override
public void setSignature(final String newSignature) {
final String oldSignature = this.signature;
this.signature = newSignature;
if (this.eNotificationRequired()) {
this.eNotify(new ENotificationImpl(this, Notification.SET, DeploymentPackage.DEPLOYED_COMPONENT__SIGNATURE, oldSignature, this.signature));
}
}
/**
*
*
*
* @generated
*/
@Override
public DeploymentContext getContext() {
final org.eclipse.emf.ecore.EObject container = this.eContainer();
if (container != null) {
final org.eclipse.emf.ecore.EObject containerContainer = container.eContainer();
if (containerContainer != null) {
return (DeploymentContext) containerContainer;
}
}
return null;
}
/**
*
*
*
* @generated
*/
@Override
public NotificationChain eInverseRemove(final InternalEObject otherEnd, final int featureID, final NotificationChain msgs) {
switch (featureID) {
case DeploymentPackage.DEPLOYED_COMPONENT__OPERATIONS:
return ((InternalEList>) this.getOperations()).basicRemove(otherEnd, msgs);
case DeploymentPackage.DEPLOYED_COMPONENT__STORAGES:
return ((InternalEList>) this.getStorages()).basicRemove(otherEnd, msgs);
case DeploymentPackage.DEPLOYED_COMPONENT__PROVIDED_INTERFACES:
return ((InternalEList>) this.getProvidedInterfaces()).basicRemove(otherEnd, msgs);
case DeploymentPackage.DEPLOYED_COMPONENT__REQUIRED_INTERFACES:
return ((InternalEList>) this.getRequiredInterfaces()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
*
*
*
* @generated
*/
@Override
public Object eGet(final int featureID, final boolean resolve, final boolean coreType) {
switch (featureID) {
case DeploymentPackage.DEPLOYED_COMPONENT__ASSEMBLY_COMPONENT:
if (resolve) {
return this.getAssemblyComponent();
}
return this.basicGetAssemblyComponent();
case DeploymentPackage.DEPLOYED_COMPONENT__OPERATIONS:
if (coreType) {
return this.getOperations();
} else {
return this.getOperations().map();
}
case DeploymentPackage.DEPLOYED_COMPONENT__STORAGES:
if (coreType) {
return this.getStorages();
} else {
return this.getStorages().map();
}
case DeploymentPackage.DEPLOYED_COMPONENT__CONTAINED_COMPONENTS:
return this.getContainedComponents();
case DeploymentPackage.DEPLOYED_COMPONENT__PROVIDED_INTERFACES:
if (coreType) {
return this.getProvidedInterfaces();
} else {
return this.getProvidedInterfaces().map();
}
case DeploymentPackage.DEPLOYED_COMPONENT__REQUIRED_INTERFACES:
return this.getRequiredInterfaces();
case DeploymentPackage.DEPLOYED_COMPONENT__SIGNATURE:
return this.getSignature();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
*
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(final int featureID, final Object newValue) {
switch (featureID) {
case DeploymentPackage.DEPLOYED_COMPONENT__ASSEMBLY_COMPONENT:
this.setAssemblyComponent((AssemblyComponent) newValue);
return;
case DeploymentPackage.DEPLOYED_COMPONENT__OPERATIONS:
((EStructuralFeature.Setting) this.getOperations()).set(newValue);
return;
case DeploymentPackage.DEPLOYED_COMPONENT__STORAGES:
((EStructuralFeature.Setting) this.getStorages()).set(newValue);
return;
case DeploymentPackage.DEPLOYED_COMPONENT__CONTAINED_COMPONENTS:
this.getContainedComponents().clear();
this.getContainedComponents().addAll((Collection extends DeployedComponent>) newValue);
return;
case DeploymentPackage.DEPLOYED_COMPONENT__PROVIDED_INTERFACES:
((EStructuralFeature.Setting) this.getProvidedInterfaces()).set(newValue);
return;
case DeploymentPackage.DEPLOYED_COMPONENT__REQUIRED_INTERFACES:
this.getRequiredInterfaces().clear();
this.getRequiredInterfaces().addAll((Collection extends DeployedRequiredInterface>) newValue);
return;
case DeploymentPackage.DEPLOYED_COMPONENT__SIGNATURE:
this.setSignature((String) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
*
* @generated
*/
@Override
public void eUnset(final int featureID) {
switch (featureID) {
case DeploymentPackage.DEPLOYED_COMPONENT__ASSEMBLY_COMPONENT:
this.setAssemblyComponent((AssemblyComponent) null);
return;
case DeploymentPackage.DEPLOYED_COMPONENT__OPERATIONS:
this.getOperations().clear();
return;
case DeploymentPackage.DEPLOYED_COMPONENT__STORAGES:
this.getStorages().clear();
return;
case DeploymentPackage.DEPLOYED_COMPONENT__CONTAINED_COMPONENTS:
this.getContainedComponents().clear();
return;
case DeploymentPackage.DEPLOYED_COMPONENT__PROVIDED_INTERFACES:
this.getProvidedInterfaces().clear();
return;
case DeploymentPackage.DEPLOYED_COMPONENT__REQUIRED_INTERFACES:
this.getRequiredInterfaces().clear();
return;
case DeploymentPackage.DEPLOYED_COMPONENT__SIGNATURE:
this.setSignature(SIGNATURE_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
*
* @generated
*/
@Override
public boolean eIsSet(final int featureID) {
switch (featureID) {
case DeploymentPackage.DEPLOYED_COMPONENT__ASSEMBLY_COMPONENT:
return this.assemblyComponent != null;
case DeploymentPackage.DEPLOYED_COMPONENT__OPERATIONS:
return (this.operations != null) && !this.operations.isEmpty();
case DeploymentPackage.DEPLOYED_COMPONENT__STORAGES:
return (this.storages != null) && !this.storages.isEmpty();
case DeploymentPackage.DEPLOYED_COMPONENT__CONTAINED_COMPONENTS:
return (this.containedComponents != null) && !this.containedComponents.isEmpty();
case DeploymentPackage.DEPLOYED_COMPONENT__PROVIDED_INTERFACES:
return (this.providedInterfaces != null) && !this.providedInterfaces.isEmpty();
case DeploymentPackage.DEPLOYED_COMPONENT__REQUIRED_INTERFACES:
return (this.requiredInterfaces != null) && !this.requiredInterfaces.isEmpty();
case DeploymentPackage.DEPLOYED_COMPONENT__SIGNATURE:
return SIGNATURE_EDEFAULT == null ? this.signature != null : !SIGNATURE_EDEFAULT.equals(this.signature);
}
return super.eIsSet(featureID);
}
/**
*
*
*
* @generated
*/
@Override
public Object eInvoke(final int operationID, final EList> arguments) throws InvocationTargetException {
switch (operationID) {
case DeploymentPackage.DEPLOYED_COMPONENT___GET_CONTEXT:
return this.getContext();
}
return super.eInvoke(operationID, arguments);
}
/**
*
*
*
* @generated
*/
@Override
public String toString() {
if (this.eIsProxy()) {
return super.toString();
}
final StringBuilder result = new StringBuilder(super.toString());
result.append(" (signature: ");
result.append(this.signature);
result.append(')');
return result.toString();
}
} // DeployedComponentImpl
© 2015 - 2025 Weber Informatics LLC | Privacy Policy