Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
-
implemented-name = IDENTIFIER
Static Semantics
A procedure declaration qualifies as an implemented name declaration if all of the following are true:
The name value of the procedure name MUST begin with an implemented interface name prefix defined by an <implements-directive> within the same class module. The class identified by <class-type-name> element of the corresponding <implements-directive> is called the interface class.
The procedure name text that follows the implemented interface name prefix MUST be the same as the name of a corresponding public variable or method defined by the interface class. The corresponding variable or method is called the interface member.
If the interface member is a variable declaration then the candidate implemented method declaration MUST be a property declaration.
If the interface member is a method declaration then the candidate implemented method MUST be the same kind (<function-declaration>, <subroutine-declaration>, <property-get-declaration>, <property-lhs-declaration>) of method declaration.
An implemented name declaration whose corresponding interface member is a method MUST have an <procedure-parameters> or <property-parameters> element that is equivalent to the <procedure-parameters> or <property-parameters> element of the interface member according to the following rules:
The <parameter-list> elements including the number of <positional-parameters>, <optional-parameters> and <param-array> elements, the declared type of each corresponding parameter, the constant values of the <default-value> of corresponding <optional-parameters> elements, and the actual <parameter-mechanism> used for each corresponding parameter. However, corresponding <parameter-list> elements can differ in their parameter names and whether or not the <parameter-mechanism> is implicitly specified or explicitly specified.
If the corresponding members are property set declarations or property get declarations their <value-param> elements MUST be equivalent according to the preceding rule.
If the interface member is a function declaration then the declared type of the function defined by the implemented name declaration and the declared type of the function defined by the interface member but be the same.
If the interface member is a variable and the implemented name declaration is a property declaration the declared type of the implemented name property declaration MUST be the same as the declared type of the interface member.
Runtime Semantics
§ When the target object of an invocation has a declared type that is an interface class of the actual target object’s class and the method name is the name of an interface member of that interface class then the actual invoked method is the method defined by the corresponding implemented method declaration of target’s object’s class.