Name
methodparam — Parameters to a method
Synopsis
methodparam ::=
(modifier*, type?,
((modifier*, parameter,
initializer?) | funcparams),
modifier*)
Attribute synopsis
Common attributes and common linking attributes.
Additional attributes:
choice(enumeration) = “opt” | “plain” | “req” [default=“req”]rep(enumeration) = “norepeat” | “repeat” [default=“norepeat”]
Description
In the syntax summary of a constructorsynopsis,
destructorsynopsis, or
methodsynopsis, methodparam
provides the description of a parameter to the method. Typically, this
includes the data type of the parameter and its name, but may also
include an initial value and other modifiers.
Processing expectations
Formatted inline. For a complete description of the processing
expectations, see classsynopsis.
Attributes
Common attributes and common linking attributes.
- choice
Indicates optionality
Enumerated values: “opt” Formatted to indicate that it is optional
“plain” Formatted without indication
“req” Formatted to indicate that it is required
- rep
Indicates whether or not repetition is possible
Enumerated values: “norepeat” Cannot be repeated
“repeat” Can be repeated
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access