H
hiwa
Does the term method signature have different definitions depending on
context?
JLS 8.4.2 --- This may be compiler's view.
<quote>
Two methods have the same signature if they have the same name and argument
types. --- 3rd edition
</quote>
Description from the second edition is a little bit longer than this but
the sense is the same.
JLS 12.3.3 --- This may be linker's view.
<quote>
NoSuchMethodError: A symbolic reference has been encountered that refers
to a specific method of a specific class or interface, but the class or
interface does not contain a method of that signature. --- 3rd edition
</quote>
NoSuchMethodError checks the return type of method as a part of signature.
If I repeat the question in other words:
Isn't there a one single formal/official definition for the term method
signature in Java or in a standard CS theory?
context?
JLS 8.4.2 --- This may be compiler's view.
<quote>
Two methods have the same signature if they have the same name and argument
types. --- 3rd edition
</quote>
Description from the second edition is a little bit longer than this but
the sense is the same.
JLS 12.3.3 --- This may be linker's view.
<quote>
NoSuchMethodError: A symbolic reference has been encountered that refers
to a specific method of a specific class or interface, but the class or
interface does not contain a method of that signature. --- 3rd edition
</quote>
NoSuchMethodError checks the return type of method as a part of signature.
If I repeat the question in other words:
Isn't there a one single formal/official definition for the term method
signature in Java or in a standard CS theory?