Hi
There is a chance that this problem might be solved by Project Coin,
which may introduce compiler-driven constructor type inference into
Java 1.7.
But in the meantime.... what are the thoughts about introducing methods like
public clas HashMap {
public static <K, V> HashMap<K, V> create() {
return new HashMap<K, V>();
}
}
which help reduce unnecessary clutter like this:
private static final Map<Class<?>, BeanDictionary> defaultsCache =
new HashMap<Class<?>, BeanDictionary>();
to this
private static final Map<Class<?>, BeanDictionary> defaultsCache =
HashMap.create();
??