I'm building a map for caching purposes that contains a class as the key and the constructors of the class (Array) as the value.
How do I declare this map using generics?
private static Map<Class<T>, java.lang.reflect.Constructor<T>[]> classConstructorsCache = new HashMap<>();
Above statements gives a "T cannot be resolved to a type" error.
Aucun commentaire:
Enregistrer un commentaire