diff options
Diffstat (limited to 'plugins/org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/room/impl/PortImpl.java')
-rw-r--r-- | plugins/org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/room/impl/PortImpl.java | 792 |
1 files changed, 396 insertions, 396 deletions
diff --git a/plugins/org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/room/impl/PortImpl.java b/plugins/org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/room/impl/PortImpl.java index 766260f63..9f5794b74 100644 --- a/plugins/org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/room/impl/PortImpl.java +++ b/plugins/org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/room/impl/PortImpl.java @@ -1,396 +1,396 @@ -/**
- */
-package org.eclipse.etrice.core.room.impl;
-
-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.etrice.core.room.Documentation;
-import org.eclipse.etrice.core.room.GeneralProtocolClass;
-import org.eclipse.etrice.core.room.Port;
-import org.eclipse.etrice.core.room.RoomPackage;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Port</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.etrice.core.room.impl.PortImpl#isConjugated <em>Conjugated</em>}</li>
- * <li>{@link org.eclipse.etrice.core.room.impl.PortImpl#getMultiplicity <em>Multiplicity</em>}</li>
- * <li>{@link org.eclipse.etrice.core.room.impl.PortImpl#getProtocol <em>Protocol</em>}</li>
- * <li>{@link org.eclipse.etrice.core.room.impl.PortImpl#getDocu <em>Docu</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class PortImpl extends InterfaceItemImpl implements Port
-{
- /**
- * The default value of the '{@link #isConjugated() <em>Conjugated</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isConjugated()
- * @generated
- * @ordered
- */
- protected static final boolean CONJUGATED_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isConjugated() <em>Conjugated</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isConjugated()
- * @generated
- * @ordered
- */
- protected boolean conjugated = CONJUGATED_EDEFAULT;
-
- /**
- * The default value of the '{@link #getMultiplicity() <em>Multiplicity</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getMultiplicity()
- * @generated
- * @ordered
- */
- protected static final int MULTIPLICITY_EDEFAULT = 1;
-
- /**
- * The cached value of the '{@link #getMultiplicity() <em>Multiplicity</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getMultiplicity()
- * @generated
- * @ordered
- */
- protected int multiplicity = MULTIPLICITY_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getProtocol() <em>Protocol</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getProtocol()
- * @generated
- * @ordered
- */
- protected GeneralProtocolClass protocol;
-
- /**
- * The cached value of the '{@link #getDocu() <em>Docu</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDocu()
- * @generated
- * @ordered
- */
- protected Documentation docu;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected PortImpl()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return RoomPackage.Literals.PORT;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isConjugated()
- {
- return conjugated;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setConjugated(boolean newConjugated)
- {
- boolean oldConjugated = conjugated;
- conjugated = newConjugated;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, RoomPackage.PORT__CONJUGATED, oldConjugated, conjugated));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public int getMultiplicity()
- {
- return multiplicity;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setMultiplicity(int newMultiplicity)
- {
- int oldMultiplicity = multiplicity;
- multiplicity = newMultiplicity;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, RoomPackage.PORT__MULTIPLICITY, oldMultiplicity, multiplicity));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public GeneralProtocolClass getProtocol()
- {
- if (protocol != null && protocol.eIsProxy())
- {
- InternalEObject oldProtocol = (InternalEObject)protocol;
- protocol = (GeneralProtocolClass)eResolveProxy(oldProtocol);
- if (protocol != oldProtocol)
- {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, RoomPackage.PORT__PROTOCOL, oldProtocol, protocol));
- }
- }
- return protocol;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public GeneralProtocolClass basicGetProtocol()
- {
- return protocol;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setProtocol(GeneralProtocolClass newProtocol)
- {
- GeneralProtocolClass oldProtocol = protocol;
- protocol = newProtocol;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, RoomPackage.PORT__PROTOCOL, oldProtocol, protocol));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Documentation getDocu()
- {
- return docu;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetDocu(Documentation newDocu, NotificationChain msgs)
- {
- Documentation oldDocu = docu;
- docu = newDocu;
- if (eNotificationRequired())
- {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, RoomPackage.PORT__DOCU, oldDocu, newDocu);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setDocu(Documentation newDocu)
- {
- if (newDocu != docu)
- {
- NotificationChain msgs = null;
- if (docu != null)
- msgs = ((InternalEObject)docu).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - RoomPackage.PORT__DOCU, null, msgs);
- if (newDocu != null)
- msgs = ((InternalEObject)newDocu).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - RoomPackage.PORT__DOCU, null, msgs);
- msgs = basicSetDocu(newDocu, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, RoomPackage.PORT__DOCU, newDocu, newDocu));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isReplicated()
- {
- return multiplicity>1 || multiplicity==-1;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
- {
- switch (featureID)
- {
- case RoomPackage.PORT__DOCU:
- return basicSetDocu(null, 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 RoomPackage.PORT__CONJUGATED:
- return isConjugated();
- case RoomPackage.PORT__MULTIPLICITY:
- return getMultiplicity();
- case RoomPackage.PORT__PROTOCOL:
- if (resolve) return getProtocol();
- return basicGetProtocol();
- case RoomPackage.PORT__DOCU:
- return getDocu();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case RoomPackage.PORT__CONJUGATED:
- setConjugated((Boolean)newValue);
- return;
- case RoomPackage.PORT__MULTIPLICITY:
- setMultiplicity((Integer)newValue);
- return;
- case RoomPackage.PORT__PROTOCOL:
- setProtocol((GeneralProtocolClass)newValue);
- return;
- case RoomPackage.PORT__DOCU:
- setDocu((Documentation)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case RoomPackage.PORT__CONJUGATED:
- setConjugated(CONJUGATED_EDEFAULT);
- return;
- case RoomPackage.PORT__MULTIPLICITY:
- setMultiplicity(MULTIPLICITY_EDEFAULT);
- return;
- case RoomPackage.PORT__PROTOCOL:
- setProtocol((GeneralProtocolClass)null);
- return;
- case RoomPackage.PORT__DOCU:
- setDocu((Documentation)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case RoomPackage.PORT__CONJUGATED:
- return conjugated != CONJUGATED_EDEFAULT;
- case RoomPackage.PORT__MULTIPLICITY:
- return multiplicity != MULTIPLICITY_EDEFAULT;
- case RoomPackage.PORT__PROTOCOL:
- return protocol != null;
- case RoomPackage.PORT__DOCU:
- return docu != null;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (conjugated: ");
- result.append(conjugated);
- result.append(", multiplicity: ");
- result.append(multiplicity);
- result.append(')');
- return result.toString();
- }
-
-} //PortImpl
+/** + */ +package org.eclipse.etrice.core.room.impl; + +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.etrice.core.room.Documentation; +import org.eclipse.etrice.core.room.GeneralProtocolClass; +import org.eclipse.etrice.core.room.Port; +import org.eclipse.etrice.core.room.RoomPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Port</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.etrice.core.room.impl.PortImpl#isConjugated <em>Conjugated</em>}</li> + * <li>{@link org.eclipse.etrice.core.room.impl.PortImpl#getMultiplicity <em>Multiplicity</em>}</li> + * <li>{@link org.eclipse.etrice.core.room.impl.PortImpl#getProtocol <em>Protocol</em>}</li> + * <li>{@link org.eclipse.etrice.core.room.impl.PortImpl#getDocu <em>Docu</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class PortImpl extends InterfaceItemImpl implements Port +{ + /** + * The default value of the '{@link #isConjugated() <em>Conjugated</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isConjugated() + * @generated + * @ordered + */ + protected static final boolean CONJUGATED_EDEFAULT = false; + + /** + * The cached value of the '{@link #isConjugated() <em>Conjugated</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isConjugated() + * @generated + * @ordered + */ + protected boolean conjugated = CONJUGATED_EDEFAULT; + + /** + * The default value of the '{@link #getMultiplicity() <em>Multiplicity</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getMultiplicity() + * @generated + * @ordered + */ + protected static final int MULTIPLICITY_EDEFAULT = 1; + + /** + * The cached value of the '{@link #getMultiplicity() <em>Multiplicity</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getMultiplicity() + * @generated + * @ordered + */ + protected int multiplicity = MULTIPLICITY_EDEFAULT; + + /** + * The cached value of the '{@link #getProtocol() <em>Protocol</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getProtocol() + * @generated + * @ordered + */ + protected GeneralProtocolClass protocol; + + /** + * The cached value of the '{@link #getDocu() <em>Docu</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDocu() + * @generated + * @ordered + */ + protected Documentation docu; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected PortImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return RoomPackage.Literals.PORT; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean isConjugated() + { + return conjugated; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setConjugated(boolean newConjugated) + { + boolean oldConjugated = conjugated; + conjugated = newConjugated; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RoomPackage.PORT__CONJUGATED, oldConjugated, conjugated)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getMultiplicity() + { + return multiplicity; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setMultiplicity(int newMultiplicity) + { + int oldMultiplicity = multiplicity; + multiplicity = newMultiplicity; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RoomPackage.PORT__MULTIPLICITY, oldMultiplicity, multiplicity)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public GeneralProtocolClass getProtocol() + { + if (protocol != null && protocol.eIsProxy()) + { + InternalEObject oldProtocol = (InternalEObject)protocol; + protocol = (GeneralProtocolClass)eResolveProxy(oldProtocol); + if (protocol != oldProtocol) + { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, RoomPackage.PORT__PROTOCOL, oldProtocol, protocol)); + } + } + return protocol; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public GeneralProtocolClass basicGetProtocol() + { + return protocol; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setProtocol(GeneralProtocolClass newProtocol) + { + GeneralProtocolClass oldProtocol = protocol; + protocol = newProtocol; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RoomPackage.PORT__PROTOCOL, oldProtocol, protocol)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Documentation getDocu() + { + return docu; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetDocu(Documentation newDocu, NotificationChain msgs) + { + Documentation oldDocu = docu; + docu = newDocu; + if (eNotificationRequired()) + { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, RoomPackage.PORT__DOCU, oldDocu, newDocu); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setDocu(Documentation newDocu) + { + if (newDocu != docu) + { + NotificationChain msgs = null; + if (docu != null) + msgs = ((InternalEObject)docu).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - RoomPackage.PORT__DOCU, null, msgs); + if (newDocu != null) + msgs = ((InternalEObject)newDocu).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - RoomPackage.PORT__DOCU, null, msgs); + msgs = basicSetDocu(newDocu, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, RoomPackage.PORT__DOCU, newDocu, newDocu)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean isReplicated() + { + return multiplicity>1 || multiplicity==-1; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case RoomPackage.PORT__DOCU: + return basicSetDocu(null, 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 RoomPackage.PORT__CONJUGATED: + return isConjugated(); + case RoomPackage.PORT__MULTIPLICITY: + return getMultiplicity(); + case RoomPackage.PORT__PROTOCOL: + if (resolve) return getProtocol(); + return basicGetProtocol(); + case RoomPackage.PORT__DOCU: + return getDocu(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case RoomPackage.PORT__CONJUGATED: + setConjugated((Boolean)newValue); + return; + case RoomPackage.PORT__MULTIPLICITY: + setMultiplicity((Integer)newValue); + return; + case RoomPackage.PORT__PROTOCOL: + setProtocol((GeneralProtocolClass)newValue); + return; + case RoomPackage.PORT__DOCU: + setDocu((Documentation)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case RoomPackage.PORT__CONJUGATED: + setConjugated(CONJUGATED_EDEFAULT); + return; + case RoomPackage.PORT__MULTIPLICITY: + setMultiplicity(MULTIPLICITY_EDEFAULT); + return; + case RoomPackage.PORT__PROTOCOL: + setProtocol((GeneralProtocolClass)null); + return; + case RoomPackage.PORT__DOCU: + setDocu((Documentation)null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case RoomPackage.PORT__CONJUGATED: + return conjugated != CONJUGATED_EDEFAULT; + case RoomPackage.PORT__MULTIPLICITY: + return multiplicity != MULTIPLICITY_EDEFAULT; + case RoomPackage.PORT__PROTOCOL: + return protocol != null; + case RoomPackage.PORT__DOCU: + return docu != null; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (conjugated: "); + result.append(conjugated); + result.append(", multiplicity: "); + result.append(multiplicity); + result.append(')'); + return result.toString(); + } + +} //PortImpl |