获取给定Bean列表中指定字段名对应字段值的列表<br>
列表元素支持Bean与Map

@param collection Bean集合或Map集合
@param fieldName 字段名或map的键
@param ignoreNull 是否忽略值为{@code null}的字段
@return 字段值列表
@since 4.5.7
557948
public static List<Object> getFieldValues(Iterable<?> collection, final String fieldName, boolean ignoreNull) {
		return extract(collection, new Editor<Object>() {
			@Override
			public Object edit(Object bean) {
				if (bean instanceof Map) {
					return ((Map<?, ?>) bean).get(fieldName);
				} else {
					return ReflectUtil.getFieldValue(bean, fieldName);
				}
			}
		}, ignoreNull);
	}
416073
public static Collection<Object> getCollectionProperties(Collection<?> collection,String name)
   throws Exception
   {
	   if(collection == null)
				throw new IllegalArgumentException("collection, name");
	   
	   ArrayList<Object> list = new ArrayList<Object>(collection.size());
	   
	   for (Object bean : collection)
		{
		   list.add(getNestedProperty(bean, name));
		}
	   
	   return list;
   }
730117
public static List<Object> getFieldValues(Class<? extends Enum<?>> clazz, String fieldName) {
		final Enum<?>[] enums = clazz.getEnumConstants();
		if (null == enums) {
			return null;
		}
		final List<Object> list = new ArrayList<>(enums.length);
		for (Enum<?> e : enums) {
			list.add(ReflectUtil.getFieldValue(e, fieldName));
		}
		return list;
	}
1305810
public T executeFrom(Object bean) {
    List<T> executeFromCollectionResult = executeFrom(Collections.singleton(bean));
    if (CollectionUtils.isEmpty(executeFromCollectionResult)) {
      return null;
    } else {
      return executeFromCollectionResult.get(0);
    }
  }
26544
public static String getMapParam(Map<String,String[]> queryMap,
			String field) {
		String arr[] = queryMap.get(field);
		if (arr == null || arr.length == 0) {
			return null;
		}
		return arr[0];
	}
141057
@Override
	public <L extends Collection<E>> L parseCollection(BinderContext context, ParserWrapper parserWrapper, L collection)  throws Exception {
		switch (context.getSupportedFormat()) {
		case XML: {
			throw (new KriptonRuntimeException(context.getSupportedFormat() + " context does not support direct collection persistance"));
		}
		default: {
			JacksonWrapperParser wrapperParser = (JacksonWrapperParser) parserWrapper;
			JsonParser parser = wrapperParser.jacksonParser;

			try {
				collection.clear();

				if (parser.nextToken() != JsonToken.START_ARRAY) {
					throw (new KriptonRuntimeException("Invalid input format"));
				}
				if (context.getSupportedFormat().onlyText) {
					while (parser.nextToken() != JsonToken.END_ARRAY) {
						collection.add(parseOnJacksonAsString(parser));
					}
				} else {
					while (parser.nextToken() != JsonToken.END_ARRAY) {
						collection.add(parseOnJackson(parser));
					}
				}
				return collection;
			} catch (IOException e) {
				e.printStackTrace();
				throw (new KriptonRuntimeException(e));
			}
		}
		}
	}
1270092
public ZealotKhala notIn(String field, Collection<?> values) {
        return this.doIn(ZealotConst.ONE_SPACE, field, values, true, false);
    }
999089
public SqlInfo buildIsNullSql(String fieldText) {
        this.suffix = StringHelper.isBlank(this.suffix) ? ZealotConst.IS_NULL_SUFFIX : this.suffix;
        join.append(prefix).append(fieldText).append(this.suffix);
        return sqlInfo.setJoin(join);
    }
1131221
public static <T> List<String> getModifiedFields(T src, T dst, String... ignoreFields) {
        Class clazz = src.getClass();
        Method[] methods = clazz.getMethods();
        List<String> ignoreFiledList = Arrays.asList(ignoreFields);
        List<String> modifiedFields = new ArrayList<String>();
        for (Method getterMethod : methods) { // 遍历目标对象的方法
            if (Modifier.isStatic(getterMethod.getModifiers())
                || !ReflectUtils.isBeanPropertyReadMethod(getterMethod)) {
                // 不是static方法， 是getter方法
                continue;
            }
            String propertyName = ReflectUtils.getPropertyNameFromBeanReadMethod(getterMethod);
            if (ignoreFiledList.contains(propertyName)) {
                // 忽略字段
                continue;
            }
            Class returnType = getterMethod.getReturnType();
            try { // 同时目标字段还需要有set方法
                Method setterMethod = ReflectUtils.getPropertySetterMethod(clazz, propertyName, returnType);
                if (setterMethod != null) {
                    Object srcVal = getterMethod.invoke(src); // 原始值
                    Object dstVal = getterMethod.invoke(dst); // 修改后值
                    if (srcVal == null) { // 左边为空
                        if (dstVal != null) {
                            modifiedFields.add(propertyName);
                        }
                    } else {
                        if (dstVal == null) { // 右边为空
                            modifiedFields.add(propertyName);
                        } else {
                            if (!srcVal.equals(dstVal)) { // 都不为空且不同
                                modifiedFields.add(propertyName);
                            }
                        }
                    }
                }
            } catch (Exception ignore) {
                // ignore 下一循环
            }
        }
        return modifiedFields;
    }
1123626
public static <T extends Collection<?>> T requireNonNullNorEmpty(T collection, String message) {
        if (requireNonNull(collection).isEmpty()) {
            throw new IllegalArgumentException(message);
        }
        return collection;
    }
419082
public static Field getField(final Class clazz, final String fieldName) {
		Validate.notNull(clazz, "clazz can't be null");
		Validate.notEmpty(fieldName, "fieldName can't be blank");
		for (Class<?> superClass = clazz; superClass != Object.class; superClass = superClass.getSuperclass()) {
			try {
				Field field = superClass.getDeclaredField(fieldName);
				makeAccessible(field);
				return field;
			} catch (NoSuchFieldException e) {// NOSONAR
				// Field不在当前类定义,继续向上转型
			}
		}
		return null;
	}
992227
public static <T> Entity parse(T bean, boolean isToUnderlineCase, boolean ignoreNullValue) {
		return create(null).parseBean(bean, isToUnderlineCase, ignoreNullValue);
	}
1230165
public Boolean getBoolean(String fieldName) {
		return hasValue(fieldName) ? Boolean.valueOf(String.valueOf(resultMap.get(fieldName))) : null;
	}
850171
private String ifNull(int rowIndex){

        if(params.length != 2){
            throw new IllegalArgumentException("Wrong number of Parameters for if null expression");
        }

        final RecordList.Record currentRecord = recordList.getRecords().get(rowIndex);
        final String field1 = currentRecord.getValueByFieldName(params[0]);

        if (!field1.isEmpty()){
            return field1;
        }
        final String field2 = currentRecord.getValueByFieldName(params[1]);
        return field2;
    }
136609
@Nullable
	private FieldAnnotation getFieldAnnotation(final String fieldName) {
		JavaClass cls = getClassContext().getJavaClass();
		Field[] fields = cls.getFields();
		for (Field f : fields) {
			if (f.getName().equals(fieldName)) {
				return new FieldAnnotation(cls.getClassName(), fieldName, f.getSignature(), f.isStatic());
			}
		}
		return null; // shouldn't happen
	}
909
public static void addIfNotNull(JSONWriter writer, String field,
			Boolean value) throws JSONException {
		if (value == null)
			return;
		writer.key(field);
		writer.value(value);
	}
566358
public static <T> List<T> getFieldValues(Iterable<?> collection, final String fieldName, final Class<T> elementType) {
		List<Object> fieldValues = getFieldValues(collection, fieldName);
		return Convert.toList(elementType, fieldValues);
	}