/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setComponentType(JvmComponentType newComponentType) { if (newComponentType != eInternalContainer() || (eContainerFeatureID() != TypesPackage.JVM_ARRAY_TYPE__COMPONENT_TYPE && newComponentType != null)) { if (EcoreUtil.isAncestor(this, newComponentType)) throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); NotificationChain msgs = null; if (eInternalContainer() != null) msgs = eBasicRemoveFromContainer(msgs); if (newComponentType != null) msgs = ((InternalEObject)newComponentType).eInverseAdd(this, TypesPackage.JVM_COMPONENT_TYPE__ARRAY_TYPE, JvmComponentType.class, msgs); msgs = basicSetComponentType(newComponentType, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, TypesPackage.JVM_ARRAY_TYPE__COMPONENT_TYPE, newComponentType, newComponentType)); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setComponentType(JvmComponentType newComponentType) { if (newComponentType != eInternalContainer() || (eContainerFeatureID() != TypesPackage.JVM_ARRAY_TYPE__COMPONENT_TYPE && newComponentType != null)) { if (EcoreUtil.isAncestor(this, newComponentType)) throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); NotificationChain msgs = null; if (eInternalContainer() != null) msgs = eBasicRemoveFromContainer(msgs); if (newComponentType != null) msgs = ((InternalEObject)newComponentType).eInverseAdd(this, TypesPackage.JVM_COMPONENT_TYPE__ARRAY_TYPE, JvmComponentType.class, msgs); msgs = basicSetComponentType(newComponentType, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, TypesPackage.JVM_ARRAY_TYPE__COMPONENT_TYPE, newComponentType, newComponentType)); }