<< §A.2 Modifiers | ↑ Table of Contents ↑ | §A.4 Parameter mappings >> |
§A.3 Method bindings
The rule of items declarable in a class body is augmented by method bindings:
§ A.3.1 | ClassBodyDeclaration ... CalloutBinding CallinBinding |
§ A.3.2 | CalloutBinding [Modifier] [TypeArguments] MethodSpec CalloutKind MethodSpec CalloutParameterMappings [Modifier] [TypeArguments] MethodSpec CalloutKind CalloutModifier FieldSpec |
§ A.3.3 | Callin binding [ Identifier : ] [TypeArguments] MethodSpec <- CallinModifier MethodSpecs [Guard] CallinParameterMappings |
§ A.3.4 | MethodSpec Identifier ResultType MethodDeclarator |
Note, that ResultType and MethodDeclarator are not explicit in the
overall syntax of the Java language specification. For convenience we refer to the definition in
section 8.4. Method Declarations
of the Java language specification.
§ A.3.5 | MethodSpecs MethodSpec [, MethodSpecs] |
§ A.3.6 | CalloutKind -> => |
§ A.3.7 | CallinModifier before after replace |
§ A.3.8 | CalloutModifier get set |
§ A.3.9 | FieldSpec [Type] Identifier |
Contextual constraints:
CalloutBinding
s andCallinBinding
s may occur only in bound role classes.- A
CalloutBinding
orCallinBinding
may not mix identifiers and full signatures (MethodDeclarationHead
) for its method specifiers (MethodSpec
).
Binding a full method signature to a field requires theFieldSpec
to include theType
. - The method specifier at the left hand side of a
CallinBinding
which has thereplace
modifier must refer to a method that has thecallin
modifier. - The
Modifier
of a callout binding can only be one of the visility modifierspublic
,protected
orprivate
. A short callout binding (i.e., without signatures) must not specify a visibility modifier.
<< §A.2 Modifiers | ↑ Table of Contents ↑ | §A.4 Parameter mappings >> |