public void setProperties(Object instance, Map map) throws IllegalAccessException, InvocationTargetException {
        if (map == null) {
            return;
        }
        for (Object object : map.keySet()) {
            String property = (String) object;
            Object v = map.get(property);
            if (isIndexedProperty(property)) {
                Map m = (Map) v;
                for (Object object1 : m.keySet()) {
                    Number n = (Number) object1;
                    Object propVal = m.get(n);
//                    System.out.println("Setting Indexed Property: " + property + ": " + n + " = " + propVal);
                    setProperty(instance, property, n, propVal);
                }
            } else {
                setProperty(instance, property, v);
            }
        }
    }