Issue 6203: UML 2 Super/Metamodel::Templates/missing return type (uml2-superstructure-ftf) Source: Simula Research Laboratory (Mr. Bran Selic, selic(at)acm.org) Nature: Uncategorized Issue Severity: Summary: OCL operation UML::AuxiliaryConstructs::Templates::TemplateableElement::parameterableElements() is missing a return type Resolution: see above Revised Text: Actions taken: September 7, 2003: received issue March 8, 2005: closed issue Discussion: This is a problem in the current metamodel (i.e., in the generated XMI), where the operation is defined without a return type. However, the operation is also named differently in the spec as opposed to the metamodel. In the spec, the operation is called “getParameterableElements” instead of “parameterableElements”. However, it is generally recommended to avoid using the “get” prefix for operation names, since that often leads to conflicts with standard naming conventions for accessors. Hence, the recommended resolution is to: 1. Change the name of the operation in the spec to “parameterableElements” which implies the following change to the text. Replace the text on page 545 (the first item in the Additional Operations subsection for TemplateableElement) from: [1] The query getParameterableElements() returns the set of elements that may be used as the parametered element for a template parameter if this templateable element. By default this set includes all the owned elements. Subclasses may override this operation if they choose to restrict the set of parameterable elements. TemplateableElement::getParameterableElements() : Set(ParameterableElement); getParameterableElements = allOwnedElements ->select(oclIsKindOf(ParameterableElement)) to [1] The query parameterableElements() returns the set of elements that may be used as the parametered elements for a template parameter of this templateable element. By default, this set includes all the owned elements. Subclasses may override this operation if they choose to restrict the set of parameterable elements. TemplateableElement::parameterableElements() : Set(ParameterableElement); parameterableElements = allOwnedElements ->select(oclIsKindOf(ParameterableElement)) 2. In the metamodel, for the class TempateableElement add a “Set(Parameterable Element)” return type to the operation “parameterableElement()”. End of Annotations:===== To: issues@omg.org Subject: UML 2 Super/Metamodel::Templates/missing return type X-Mailer: Lotus Notes Release 5.0.11 July 24, 2002 From: Branislav Selic Date: Sun, 7 Sep 2003 09:20:17 -0400 X-MIMETrack: Serialize by Router on D25ML05/25/M/IBM(Release 6.0.2CF1|June 9, 2003) at 09/07/2003 09:20:18, Serialize complete at 09/07/2003 09:20:18 OCL operation UML::AuxiliaryConstructs::Templates::TemplateableElement::parameterableElements() is missing a return type. Bran Selic IBM Software Group -- Rational Software 770 Palladium Drive Kanata, Ontario, Canada K2V 1C8 ph. (613) 591-7915 fax (613) 599-3912 OMG Issue No: 6203 Title: UML 2 Super/Metamodel::Templates/missing return type Source: International Business Machines (Mr. Bran Selic, bselic@ca.ibm.com) Summary: OCL operation UML::AuxiliaryConstructs::Templates::TemplateableElement::parameterableElements() is missing a return type Discussion: This is a problem in the current metamodel (i.e., in the generated XMI), where the operation is defined without a return type. However, the operation is also named differently in the spec as opposed to the metamodel. In the spec, the operation is called .getparameterableElements. instead of .parameterableElements.. However, it is generally recommended to avoid using the .get. prefix for operation names, since that often leads to conflicts with standard java naming conventions for accessors. Hence, the recommended resolution is to: 1. Change the name of the operation in the spec to .parameterableElements.m which implies the following change to the text. Replace the text on page 545 (the first item in the Additional Operations subsection for TemplateableElement) from: [1] The query getParameterableElements() returns the set of elements that may be used as the parametered element for a template parameter if this templateable element. By default this set includes all the owned elements. Subclasses may override this operation if they choose to restrict the set of parameterable elements. TemplateableElement::getParameterableElements() : Set(ParameterableElement); getParameterableElements = allOwnedElements->select(oclIsKindOf(ParameterableElement)) to [1] The query parameterableElements() returns the set of elements that may be used as the parametered elements for a template parameter of this templateable element. By default this set includes all the owned elements. Subclasses may override this operation if they choose to restrict the set of parameterable elements. TemplateableElement::parameterableElements() : Set(ParameterableElement); parameterableElements = allOwnedElements->select(oclIsKindOf(ParameterableElement)) 2. In the metamodel, for the class TempateableElement add a .Set(ParameterableElement). return type to the operation .parameterableElement().. Disposition: Resolved e-mail: bselic@ca.ibm.com