An OpaqueExpression in UML 2 is used to specify behavior in a textual form when it is not necessary
to specify which language is used, or when it is not possible to use graphical notation. According to
the UML 2 specification, an OpaqueExpression is not limited to any particular language; it can
represent expressions written in any language.
The key characteristics of an OpaqueExpression are as follows:
The 'body' of an OpaqueExpression is a sequence of strings, where each string could be written in a
different language. This means it has the capacity to include multiple languages simultaneously.
The 'language' attribute is optional and is used to indicate the languages of the respective 'body'
parts.
The allowance for any language is clearly stated in the UML 2 Infrastructure Specification.
OpaqueExpression is designed to be a flexible way to capture expressions that are not readily
expressible in UML or when using a language outside the scope of UML (e.g., mathematical
expressions, programming languages, or other domain-specific languages).