Class[] classes = new Class[delegates.length]; for (int i = 0; i < delegates.length; i++) { classes[i] = delegates[i].getClass(); } Object key = keyFactory.newInstance(classes);
Object key = keyFactory.newInstance(getClasses(delegates));
    synchronized private static Info getInfo(Object[] delegates) {        // TODO: optimize object->class conversion?        Class[] classes = new Class[delegates.length];        for (int i = 0; i < delegates.length; i++) {            classes[i] = delegates[i].getClass();        }        Object key = keyFactory.newInstance(classes);        Info info = (Info)infoCache.get(key);        if (info == null)            infoCache.put(key, info = new Info(delegates));        return info;    }