Previous UML Classes Table of Contents UML Packages Next

13.3.21 OpaqueExpression




    OpaqueExpression (from Kernel ) on page 103 (merge increment)


   Provides a mechanism for precisely defining the behavior of an opaque expression. An opaque expression is defined by a behavior restricted to return one result.


   No additional attributes



Issue 8312 - modify first constraint and add OCL to both constraints

   [1] The behavior can only have return result parameters.

   self.behavior.notEmpty() implies(self.behavior.ownedParameters->select(p | p.direction <> ParameterDirectionKind ::return))->isEmpty()

   [2] The behavior must have exactly one return result parameter.

   self.behavior.notEmpty() implies(self.behavior.ownedParameter->select(p | p.direction = ParameterDirectionKind ::return))->size() = 1


   An opaque expression is invoked by the execution of its owning element. An opaque expression does not have formal parameters and thus cannot be passed data upon invocation. It accesses its input data through elements of its behavioral description. Upon completion of its execution, a single value or a single set of values is returned to its owner.