I don't think there is a way to disambiguate to the type parameter, and I think that that was a reasonable design decision to make.
- The conventions are clear that type parameters should be one character long if possible, and the flipside to this is that other classes shouldn't have one-character names.
- If you had the ability to disambiguate, then you would have the ability to rename the type parameter
X
in Bar<X>
. In other words, if you had the ability to say foobar(TypeParameter.X t)
you would have the ability to simply use something other than X
for the type parameter on Bar
. Renaming X
is the way you avoid name clashes.
Don't forget that type parameter names don't leak out to other classes in more than trivial ways. You are never forced to use a certain type parameter name, ever. So it makes sense that the language designers wouldn't have thought this is worth adding complexity to the language for.