Java tutorial
//package com.java2s; //License from project: Apache License import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; public class Main { public static Map<Integer, Set<Class<?>>> simpleParameterClasses(final Class<?>... classes) { final Map<Integer, Set<Class<?>>> res = new HashMap<>(classes.length); for (int i = 0; i < classes.length; i++) { final Set<Class<?>> set = new HashSet<>(1); set.add(classes[i]); res.put(i, set); } return res; } }