Mike Schilling writes:
That applies to 1.5 as well, except for generics and covariant return types.
There still are several patterns, where an abbreviation
would come in handy:
final TYPE x = new TYPE(...);
-->
final x = new TYPE();
i.e., ??TYPE?? is implied
if( x instanceof TYPE ){ final TYPE y=( TYPE )x; ... }
-->
if( TYPE y = x ){ ... }
new INTERFACE(...)
-->
will create an instance of the first matching default
implementation class for this interface taken from a
configuration text file. Resolving this at runtime
would be more flexible, but has some security
implications, too. This should only be used when a
program indeed can run correctly with /any/
reasonable implementation of a certain interface.
of the barrel for things to change. I guess we have always to find something