private static Map<String, Method> resolveNameWriterMapping(Class<?> cls) throws IntrospectionException {
        Map<String, Method> ret = new HashMap<String, Method>();
        BeanInfo bi = Introspector.getBeanInfo(cls);
        for (PropertyDescriptor pd : bi.getPropertyDescriptors()) {
            if ("class".equals(pd.getName())) continue;
            ret.put(pd.getName(), pd.getWriteMethod());
        }
        return ret;
    }