/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public GenOperation createGenOperation() { GenOperationImpl genOperation = new GenOperationImpl(); return genOperation; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public NotificationChain basicSetGenClass(GenClass newGenClass, NotificationChain msgs) { msgs = eBasicSetContainer((InternalEObject)newGenClass, GenModelPackage.GEN_OPERATION__GEN_CLASS, msgs); return msgs; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public GenClass getGenClass() { if (eContainerFeatureID() != GenModelPackage.GEN_OPERATION__GEN_CLASS) return null; return (GenClass)eInternalContainer(); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setEcoreOperation(EOperation newEcoreOperation) { EOperation oldEcoreOperation = ecoreOperation; ecoreOperation = newEcoreOperation; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, GenModelPackage.GEN_OPERATION__ECORE_OPERATION, oldEcoreOperation, ecoreOperation)); }
EOperation eOperation = getEcoreOperation(); StringBuffer result = new StringBuffer(); if (getGenParameters().isEmpty() && ((getName().startsWith("get") && getName().length() > 3 && Character.isUpperCase(getName().charAt(3))) || (getName().startsWith("is") && getName().length() > 2 && Character.isUpperCase(getName().charAt(2))))) appendModelSetting(result, "kind", "operation"); if (!isVoid()) String mapModelInfo = getMapModelInfo(false, true); if (mapModelInfo != null) if (eOperation.isMany() && getEffectiveComplianceLevel().getValue() < GenJDKLevel.JDK50 || hasReferenceToClassifierWithInstanceTypeName(eOperation.getEGenericType())) appendModelSetting(result, false, "type", getEcoreType(eOperation.getEGenericType())); else if (eOperation.isMany() && getEffectiveComplianceLevel().getValue() < GenJDKLevel.JDK50 || hasReferenceToClassifierWithInstanceTypeName(eOperation.getEGenericType())) GenPackage genPackage = findGenPackage(type.getEPackage()); if (genPackage != null && (isFeatureMapType() || !genPackage.isEcorePackage())) appendModelSetting(result, false, "dataType", getEcoreType(eOperation.getEGenericType())); appendModelSetting(result, "unique", "false");
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setGenClass(GenClass newGenClass) { if (newGenClass != eInternalContainer() || (eContainerFeatureID() != GenModelPackage.GEN_OPERATION__GEN_CLASS && newGenClass != null)) { if (EcoreUtil.isAncestor(this, newGenClass)) throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); NotificationChain msgs = null; if (eInternalContainer() != null) msgs = eBasicRemoveFromContainer(msgs); if (newGenClass != null) msgs = ((InternalEObject)newGenClass).eInverseAdd(this, GenModelPackage.GEN_CLASS__GEN_OPERATIONS, GenClass.class, msgs); msgs = basicSetGenClass(newGenClass, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, GenModelPackage.GEN_OPERATION__GEN_CLASS, newGenClass, newGenClass)); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case GenModelPackage.GEN_OPERATION__GEN_CLASS: return getGenClass(); case GenModelPackage.GEN_OPERATION__ECORE_OPERATION: if (resolve) return getEcoreOperation(); return basicGetEcoreOperation(); case GenModelPackage.GEN_OPERATION__GEN_PARAMETERS: return getGenParameters(); case GenModelPackage.GEN_OPERATION__GEN_TYPE_PARAMETERS: return getGenTypeParameters(); case GenModelPackage.GEN_OPERATION__SUPPRESSED_VISIBILITY: return isSuppressedVisibility(); case GenModelPackage.GEN_OPERATION__BODY: return getBody(); } return super.eGet(featureID, resolve, coreType); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case GenModelPackage.GEN_OPERATION__GEN_CLASS: return getGenClass(); case GenModelPackage.GEN_OPERATION__ECORE_OPERATION: if (resolve) return getEcoreOperation(); return basicGetEcoreOperation(); case GenModelPackage.GEN_OPERATION__GEN_PARAMETERS: return getGenParameters(); case GenModelPackage.GEN_OPERATION__GEN_TYPE_PARAMETERS: return getGenTypeParameters(); } return super.eGet(featureID, resolve, coreType); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @SuppressWarnings("unchecked") @Override public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case GenModelPackage.GEN_OPERATION__GEN_CLASS: if (eInternalContainer() != null) msgs = eBasicRemoveFromContainer(msgs); return basicSetGenClass((GenClass)otherEnd, msgs); case GenModelPackage.GEN_OPERATION__GEN_PARAMETERS: return ((InternalEList<InternalEObject>)(InternalEList<?>)getGenParameters()).basicAdd(otherEnd, msgs); } return super.eInverseAdd(otherEnd, featureID, msgs); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EOperation getEcoreOperation() { if (ecoreOperation != null && ecoreOperation.eIsProxy()) { InternalEObject oldEcoreOperation = (InternalEObject)ecoreOperation; ecoreOperation = (EOperation)eResolveProxy(oldEcoreOperation); if (ecoreOperation != oldEcoreOperation) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, GenModelPackage.GEN_OPERATION__ECORE_OPERATION, oldEcoreOperation, ecoreOperation)); } } return ecoreOperation; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case GenModelPackage.GEN_OPERATION__GEN_CLASS: return basicSetGenClass(null, msgs); case GenModelPackage.GEN_OPERATION__GEN_PARAMETERS: return ((InternalEList<?>)getGenParameters()).basicRemove(otherEnd, msgs); case GenModelPackage.GEN_OPERATION__GEN_TYPE_PARAMETERS: return ((InternalEList<?>)getGenTypeParameters()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { switch (eContainerFeatureID) { case GenModelPackage.GEN_OPERATION__GEN_CLASS: return eInternalContainer().eInverseRemove(this, GenModelPackage.GEN_CLASS__GEN_OPERATIONS, GenClass.class, msgs); } return super.eBasicRemoveFromContainerFeature(msgs); }
EOperation eOperation = getEcoreOperation(); StringBuffer result = new StringBuffer(); if (getGenParameters().isEmpty() && ((getName().startsWith("get") && getName().length() > 3 && Character.isUpperCase(getName().charAt(3))) || (getName().startsWith("is") && getName().length() > 2 && Character.isUpperCase(getName().charAt(2))))) appendModelSetting(result, "kind", "operation"); if (!isVoid()) String mapModelInfo = getMapModelInfo(false, true); if (mapModelInfo != null) if (eOperation.isMany() && getEffectiveComplianceLevel().getValue() < GenJDKLevel.JDK50 || hasReferenceToClassifierWithInstanceTypeName(eOperation.getEGenericType())) appendModelSetting(result, false, "type", getEcoreType(eOperation.getEGenericType())); else if (eOperation.isMany() && getEffectiveComplianceLevel().getValue() < GenJDKLevel.JDK50 || hasReferenceToClassifierWithInstanceTypeName(eOperation.getEGenericType())) GenPackage genPackage = findGenPackage(type.getEPackage()); if (genPackage != null && (isFeatureMapType() || !genPackage.isEcorePackage())) appendModelSetting(result, false, "dataType", getEcoreType(eOperation.getEGenericType())); appendModelSetting(result, "unique", "false");
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setGenClass(GenClass newGenClass) { if (newGenClass != eInternalContainer() || (eContainerFeatureID != GenModelPackage.GEN_OPERATION__GEN_CLASS && newGenClass != null)) { if (EcoreUtil.isAncestor(this, newGenClass)) throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); NotificationChain msgs = null; if (eInternalContainer() != null) msgs = eBasicRemoveFromContainer(msgs); if (newGenClass != null) msgs = ((InternalEObject)newGenClass).eInverseAdd(this, GenModelPackage.GEN_CLASS__GEN_OPERATIONS, GenClass.class, msgs); msgs = basicSetGenClass(newGenClass, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, GenModelPackage.GEN_OPERATION__GEN_CLASS, newGenClass, newGenClass)); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @SuppressWarnings("unchecked") @Override public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case GenModelPackage.GEN_OPERATION__GEN_CLASS: if (eInternalContainer() != null) msgs = eBasicRemoveFromContainer(msgs); return basicSetGenClass((GenClass)otherEnd, msgs); case GenModelPackage.GEN_OPERATION__GEN_PARAMETERS: return ((InternalEList<InternalEObject>)(InternalEList<?>)getGenParameters()).basicAdd(otherEnd, msgs); } return super.eInverseAdd(otherEnd, featureID, msgs); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setEcoreOperation(EOperation newEcoreOperation) { EOperation oldEcoreOperation = ecoreOperation; ecoreOperation = newEcoreOperation; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, GenModelPackage.GEN_OPERATION__ECORE_OPERATION, oldEcoreOperation, ecoreOperation)); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EOperation getEcoreOperation() { if (ecoreOperation != null && ecoreOperation.eIsProxy()) { InternalEObject oldEcoreOperation = (InternalEObject)ecoreOperation; ecoreOperation = (EOperation)eResolveProxy(oldEcoreOperation); if (ecoreOperation != oldEcoreOperation) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, GenModelPackage.GEN_OPERATION__ECORE_OPERATION, oldEcoreOperation, ecoreOperation)); } } return ecoreOperation; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case GenModelPackage.GEN_OPERATION__GEN_CLASS: return basicSetGenClass(null, msgs); case GenModelPackage.GEN_OPERATION__GEN_PARAMETERS: return ((InternalEList<?>)getGenParameters()).basicRemove(otherEnd, msgs); case GenModelPackage.GEN_OPERATION__GEN_TYPE_PARAMETERS: return ((InternalEList<?>)getGenTypeParameters()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { switch (eContainerFeatureID()) { case GenModelPackage.GEN_OPERATION__GEN_CLASS: return eInternalContainer().eInverseRemove(this, GenModelPackage.GEN_CLASS__GEN_OPERATIONS, GenClass.class, msgs); } return super.eBasicRemoveFromContainerFeature(msgs); }