[java] Instantiating a generic type