XCSG:Parameter

From AtlasWiki
Revision as of 13:55, 5 March 2014 by Xingyan (Talk | contribs)

Jump to: navigation, search

The semantics of Parameter include those common to UML [5, p. 2-51, 2-69], MS-IL, and the JVM.

The defaultValue of a Parameter must be compatible with its type.

When default parameter values are overridden, the default parameter value associated with a call should always be determined by the run time type of the target object.


Specifications

Metaclass Parameter
Extends Variable, TemplateParameter
Description An unbound variable used in the specification of an operation, a message, an event, a template, etc.
References [5, p. 2-14, Figure 2-5], [5, p. 2-51, 2-69], [26, CodeParameterDeclarationExpression]
Attribute kind
Type ParameterDirectionKind
Description The kind of parameter (in, out, inout, return)


Language Mappings

The kind property is related to the use of keywords such as const (in C++), final (in Java), or in, out and inout (in Ada), which restrict read/write access to individual parameters. C++ does not handle overridden default parameter values correctly, as explained by Scott Meyers [47, Item 38].