/** * 忽略以下属性:不可读写/value是集合/value类型是DomainImpl的任何一级子类 */ private static boolean isBeanPropertyIgnore(BeanMap beanMap, Map<String, Object> params, String key) { if (beanMap.getWriteMethod(key) == null) return true; Object value = params.get(key); if (value instanceof Collection) return true; Method method = beanMap.getReadMethod(key); if (method == null) return true; if (DomainImpl.class.isAssignableFrom(method.getReturnType())) return true; return false; }
采用反射机制,得出属性是否忽略
猜你喜欢
转载自www.cnblogs.com/zhiqsyr/p/12061167.html
今日推荐
周排行