I mean, what is the point in complaining about
String s = map.get(key);
Java is quite strongly type language - all casts are supposed to be explicit, to warn about possibility of cast error. map.get is obvious, but in case of
String s = randomMethod();
if you will get a class cast exception, it will require a bit of thinking why it could have happened at that line.
Of course, this line of reasoning is not longer valid with auto boxing/unboxing - it does exactly what you want, just for primitive types/wrappers.
Some time ago I have seen a proposal for introducing extra operator exactly for operation you want. At cost of one extra character, you would note that you intent to automatically cast object to whatever type is needed
String s := map.get(key);
(of course, := is just an example).
Unfortunately, such solution leaves other half of the problem
((MyClass)map.get(key)).method();
And here, script languages rule the field
map[key].method();
not to mention map.values().forEach({ it.method() }); and groovy GPath expressions...