static Object accessArray(String name, Object val, int idx[]) {
        if (!val.getClass().isArray()) {
            throw new IllegalArgumentException("Not an array : " + name + " " + val);
        }
        for (int i : idx) {
            val = Array.get(val, i);
        }
        return val;
    }