user13143654 wrote:"The first phase ([url http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#301185]§126.96.36.199) performs overload resolution..."
This is embarrassing: I've already looked there (but only cursorily). I still don't see it. I was hoping someone would have drilled down in there to know where it could be at least inferred. Any ideas?
user13143654 wrote:I wouldn't call it "ephemeral" and "wafting." It's pretty specific. If you're looking for the $T1_extends_Object notation, you won't find it. That's not part of the spec.
Yeah, I know. The title of the subsection is "Determining Method Signature," but then it never seems to expressly do that other than in some ephemeral wafting byproduct of overload resolution.
I can't seem to find a specific spot in the subsection where I can say "OK, now I've got the method signature and now can proceed to ..."Well, it goes on to Phase 3, and then on to 188.8.131.52 Choosing the Most Specific Method. I'm not sure what you're looking for. It does describe in detail how we get from all the methods in the universe, to which type's methods we'll be considering to which signatures could match to which one is the best match. I don't know what else you're looking for.
user13143654 wrote:We don't always get what we want.
I understand "$T1_extends_Object" is certainly an artifact of the compiler Langer was using, but there still never seems to be a clear spot in the algorithm where it is really clear that the type parameters and their bounds are an integral part of a generic method's signature. I was just hoping someone in these environs knew where in that mess that the fact that they are could be at least inferred. I didn't want to have to wade through the whole thing and have that fact be like the conclusion of a mathematical conjecture that took years to prove before it became a celebrated theorem.
user13143654 wrote:In the sections I already indicated. However, it's neither stated that directly, nor is it an inference. It is simply a conclusion.
Where in the JLS can it be seen (or inferred) that the type parameters and their bounds are an integral part of a generic method's signature such that a compiler writer would know that this generic method:
<T> T method(T arg)
would have a signature that could be expressed like this:
It would seem to be intuitively clear that the type parameter and bounds would be part of the method signature but I can't seem to find such a stipulation/requirement of such in the Java Language Specification.and
Where in the JLS can it be seen (or inferred) that the type parameters and their bounds are an integral part of a generic method's signatureJLS #8.4.2, third bullet point. Note the part about 'the bounds of corresponding type variables'.