/plugins/net.jgsuess.uml14/src/net/jgsuess/uml14/behavioral_elements/common_behavior/impl/ReceptionImpl.java
https://gitlab.com/jgsuess/uml-1.4.2 · Java · 445 lines · 208 code · 37 blank · 200 comment · 40 complexity · 0c5178309a8ecf55ea30ab92306227b8 MD5 · raw file
- /**
- * <copyright>
- * </copyright>
- *
- * $Id: ReceptionImpl.java,v 1.1 2012/04/23 09:31:14 uqjsuss Exp $
- */
- package net.jgsuess.uml14.behavioral_elements.common_behavior.impl;
- import net.jgsuess.uml14.behavioral_elements.common_behavior.Common_behaviorPackage;
- import net.jgsuess.uml14.behavioral_elements.common_behavior.Reception;
- import net.jgsuess.uml14.behavioral_elements.common_behavior.Signal;
- import net.jgsuess.uml14.foundation.core.impl.BehavioralFeatureImpl;
- 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;
- /**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Reception</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link net.jgsuess.uml14.behavioral_elements.common_behavior.impl.ReceptionImpl#getSpecification <em>Specification</em>}</li>
- * <li>{@link net.jgsuess.uml14.behavioral_elements.common_behavior.impl.ReceptionImpl#isIsRoot <em>Is Root</em>}</li>
- * <li>{@link net.jgsuess.uml14.behavioral_elements.common_behavior.impl.ReceptionImpl#isIsLeaf <em>Is Leaf</em>}</li>
- * <li>{@link net.jgsuess.uml14.behavioral_elements.common_behavior.impl.ReceptionImpl#isIsAbstract <em>Is Abstract</em>}</li>
- * <li>{@link net.jgsuess.uml14.behavioral_elements.common_behavior.impl.ReceptionImpl#getSignal <em>Signal</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
- public class ReceptionImpl extends BehavioralFeatureImpl implements Reception {
- /**
- * The default value of the '{@link #getSpecification() <em>Specification</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecification()
- * @generated
- * @ordered
- */
- protected static final String SPECIFICATION_EDEFAULT = null;
- /**
- * The cached value of the '{@link #getSpecification() <em>Specification</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSpecification()
- * @generated
- * @ordered
- */
- protected String specification = SPECIFICATION_EDEFAULT;
- /**
- * The default value of the '{@link #isIsRoot() <em>Is Root</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isIsRoot()
- * @generated
- * @ordered
- */
- protected static final boolean IS_ROOT_EDEFAULT = false;
- /**
- * The cached value of the '{@link #isIsRoot() <em>Is Root</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isIsRoot()
- * @generated
- * @ordered
- */
- protected boolean isRoot = IS_ROOT_EDEFAULT;
- /**
- * The default value of the '{@link #isIsLeaf() <em>Is Leaf</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isIsLeaf()
- * @generated
- * @ordered
- */
- protected static final boolean IS_LEAF_EDEFAULT = false;
- /**
- * The cached value of the '{@link #isIsLeaf() <em>Is Leaf</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isIsLeaf()
- * @generated
- * @ordered
- */
- protected boolean isLeaf = IS_LEAF_EDEFAULT;
- /**
- * The default value of the '{@link #isIsAbstract() <em>Is Abstract</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isIsAbstract()
- * @generated
- * @ordered
- */
- protected static final boolean IS_ABSTRACT_EDEFAULT = false;
- /**
- * The cached value of the '{@link #isIsAbstract() <em>Is Abstract</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isIsAbstract()
- * @generated
- * @ordered
- */
- protected boolean isAbstract = IS_ABSTRACT_EDEFAULT;
- /**
- * The cached value of the '{@link #getSignal() <em>Signal</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSignal()
- * @generated
- * @ordered
- */
- protected Signal signal;
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ReceptionImpl() {
- super();
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return Common_behaviorPackage.Literals.RECEPTION;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getSpecification() {
- return specification;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setSpecification(String newSpecification) {
- String oldSpecification = specification;
- specification = newSpecification;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, Common_behaviorPackage.RECEPTION__SPECIFICATION, oldSpecification, specification));
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isIsRoot() {
- return isRoot;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setIsRoot(boolean newIsRoot) {
- boolean oldIsRoot = isRoot;
- isRoot = newIsRoot;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, Common_behaviorPackage.RECEPTION__IS_ROOT, oldIsRoot, isRoot));
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isIsLeaf() {
- return isLeaf;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setIsLeaf(boolean newIsLeaf) {
- boolean oldIsLeaf = isLeaf;
- isLeaf = newIsLeaf;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, Common_behaviorPackage.RECEPTION__IS_LEAF, oldIsLeaf, isLeaf));
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isIsAbstract() {
- return isAbstract;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setIsAbstract(boolean newIsAbstract) {
- boolean oldIsAbstract = isAbstract;
- isAbstract = newIsAbstract;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, Common_behaviorPackage.RECEPTION__IS_ABSTRACT, oldIsAbstract, isAbstract));
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Signal getSignal() {
- if (signal != null && signal.eIsProxy()) {
- InternalEObject oldSignal = (InternalEObject)signal;
- signal = (Signal)eResolveProxy(oldSignal);
- if (signal != oldSignal) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, Common_behaviorPackage.RECEPTION__SIGNAL, oldSignal, signal));
- }
- }
- return signal;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Signal basicGetSignal() {
- return signal;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetSignal(Signal newSignal, NotificationChain msgs) {
- Signal oldSignal = signal;
- signal = newSignal;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Common_behaviorPackage.RECEPTION__SIGNAL, oldSignal, newSignal);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setSignal(Signal newSignal) {
- if (newSignal != signal) {
- NotificationChain msgs = null;
- if (signal != null)
- msgs = ((InternalEObject)signal).eInverseRemove(this, Common_behaviorPackage.SIGNAL__RECEPTION, Signal.class, msgs);
- if (newSignal != null)
- msgs = ((InternalEObject)newSignal).eInverseAdd(this, Common_behaviorPackage.SIGNAL__RECEPTION, Signal.class, msgs);
- msgs = basicSetSignal(newSignal, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, Common_behaviorPackage.RECEPTION__SIGNAL, newSignal, newSignal));
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case Common_behaviorPackage.RECEPTION__SIGNAL:
- if (signal != null)
- msgs = ((InternalEObject)signal).eInverseRemove(this, Common_behaviorPackage.SIGNAL__RECEPTION, Signal.class, msgs);
- return basicSetSignal((Signal)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 Common_behaviorPackage.RECEPTION__SIGNAL:
- return basicSetSignal(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 Common_behaviorPackage.RECEPTION__SPECIFICATION:
- return getSpecification();
- case Common_behaviorPackage.RECEPTION__IS_ROOT:
- return isIsRoot();
- case Common_behaviorPackage.RECEPTION__IS_LEAF:
- return isIsLeaf();
- case Common_behaviorPackage.RECEPTION__IS_ABSTRACT:
- return isIsAbstract();
- case Common_behaviorPackage.RECEPTION__SIGNAL:
- if (resolve) return getSignal();
- return basicGetSignal();
- }
- return super.eGet(featureID, resolve, coreType);
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case Common_behaviorPackage.RECEPTION__SPECIFICATION:
- setSpecification((String)newValue);
- return;
- case Common_behaviorPackage.RECEPTION__IS_ROOT:
- setIsRoot((Boolean)newValue);
- return;
- case Common_behaviorPackage.RECEPTION__IS_LEAF:
- setIsLeaf((Boolean)newValue);
- return;
- case Common_behaviorPackage.RECEPTION__IS_ABSTRACT:
- setIsAbstract((Boolean)newValue);
- return;
- case Common_behaviorPackage.RECEPTION__SIGNAL:
- setSignal((Signal)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case Common_behaviorPackage.RECEPTION__SPECIFICATION:
- setSpecification(SPECIFICATION_EDEFAULT);
- return;
- case Common_behaviorPackage.RECEPTION__IS_ROOT:
- setIsRoot(IS_ROOT_EDEFAULT);
- return;
- case Common_behaviorPackage.RECEPTION__IS_LEAF:
- setIsLeaf(IS_LEAF_EDEFAULT);
- return;
- case Common_behaviorPackage.RECEPTION__IS_ABSTRACT:
- setIsAbstract(IS_ABSTRACT_EDEFAULT);
- return;
- case Common_behaviorPackage.RECEPTION__SIGNAL:
- setSignal((Signal)null);
- return;
- }
- super.eUnset(featureID);
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case Common_behaviorPackage.RECEPTION__SPECIFICATION:
- return SPECIFICATION_EDEFAULT == null ? specification != null : !SPECIFICATION_EDEFAULT.equals(specification);
- case Common_behaviorPackage.RECEPTION__IS_ROOT:
- return isRoot != IS_ROOT_EDEFAULT;
- case Common_behaviorPackage.RECEPTION__IS_LEAF:
- return isLeaf != IS_LEAF_EDEFAULT;
- case Common_behaviorPackage.RECEPTION__IS_ABSTRACT:
- return isAbstract != IS_ABSTRACT_EDEFAULT;
- case Common_behaviorPackage.RECEPTION__SIGNAL:
- return signal != 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(" (specification: ");
- result.append(specification);
- result.append(", isRoot: ");
- result.append(isRoot);
- result.append(", isLeaf: ");
- result.append(isLeaf);
- result.append(", isAbstract: ");
- result.append(isAbstract);
- result.append(')');
- return result.toString();
- }
- } //ReceptionImpl