Pair<ColumnName, FieldName>

@param field 字段
@return 返回列名和字段名
511536
private static Pair<String, String> getColumnName(Field field) {
        String fieldName = field.getName();
        Column column    = field.getAnnotation(Column.class);
        if (null != column && StringUtils.isNotBlank(column.name())) {
            fieldName = column.name();
        }
        String columnName = NameUtils.getUnderlineName(fieldName);
        return new Pair<>(columnName, fieldName);
    }
1362599
public static function getColumnName($field)
    {
        static::init();
        if (!static::fieldExists($field)) {
            throw new Exception('getColumnName called on nonexisting column: ' . get_called_class().'->'.$field);
        }

        return static::$_classFields[get_called_class()][$field]['columnName'];
    }
479245
public static String getMapFieldAddAllName(Field field) {
        if (field.isMap()) {
            return "putAll" + Formatter.toPascalCase(field.getName());
        }
        throw new IllegalArgumentException(field.toString());
    }
851999
@SuppressWarnings("rawtypes")
    private static Field getDeclaredField(Class clazz, String fieldName) throws NoSuchFieldException {
        Assert.notNull(clazz);
        Assert.hasText(fieldName);
        for (Class superClass = clazz; superClass != Object.class; superClass = superClass.getSuperclass()) {
            try {
                return superClass.getDeclaredField(fieldName);
            } catch (NoSuchFieldException e) {
                // Field不在当前类定义,继续向上转型
            }
        }
        throw new NoSuchFieldException("No such field: " + clazz.getName() + '.' + fieldName);
    }
514475
public static String getRepeatedFieldGetterName(Field field) {
        if (field.isRepeated()) {
            return GETTER_PREFIX + Formatter.toPascalCase(field.getName()) + GETTER_REPEATED_SUFFIX;
        }
        throw new IllegalArgumentException(field.toString());
    }
1352602
public String[] generateFieldNameCodes(final String objectName, final String field) {
        
        final List<String> codeList = new ArrayList<String>();
        codeList.addAll(Arrays.asList(generateCodes(null, objectName, field, null)));
        
        // オブジェクト名の最後の値を取得する
        final int dotIndex = objectName.lastIndexOf('.');
        if(dotIndex > 0) {
            final String subName = objectName.substring(dotIndex + 1);
            for(String code : generateCodes(null, subName, field, null)) {
                if(!codeList.contains(code)) {
                    codeList.add(code);
                }
            }
            
        }
        
        return codeList.toArray(new String[codeList.size()]);
    }
1373957
public static String toStringPart(Field field) {
        String getterName;
        if (field.isMap()) {
            getterName = getMapGetterName(field);
        } else if (field.isRepeated()) {
            getterName = getRepeatedFieldGetterName(field);
        } else {
            getterName = getFieldGetterName(field);
        }
        if (field.getType().isEnum() && !field.isRepeated()) {
            return "\"" + getFieldName(field) + "=\" + " + getterName + "() + '(' + " + getEnumFieldValueGetterName(field) + "() + ')'";
        }
        return "\"" + getFieldName(field) + "=\" + " + getterName + "()";
    }
1230815
private boolean isCsvField(final String field, final ValidationContext<Object> validationContext) {
        return validationContext.getBeanMapping().getColumnMapping(field).isPresent();
    }
621775
private PropDesc createProp(Field field) {
		final String fieldName = field.getName();
		final Class<?> fieldType = field.getType();
		final boolean isBooeanField = BooleanUtil.isBoolean(fieldType);

		Method getter = null;
		Method setter = null;

		String methodName;
		Class<?>[] parameterTypes;
		for (Method method : ReflectUtil.getMethods(this.beanClass)) {
			parameterTypes = method.getParameterTypes();
			if (parameterTypes.length > 1) {
				// 多于1个参数说明非Getter或Setter
				continue;
			}

			methodName = method.getName();
			if (parameterTypes.length == 0) {
				// 无参数，可能为Getter方法
				if (isMatchGetter(methodName, fieldName, isBooeanField)) {
					// 方法名与字段名匹配，则为Getter方法
					getter = method;
				}
			} else if (isMatchSetter(methodName, fieldName, isBooeanField)) {
				// 只有一个参数的情况下方法名与字段名对应匹配，则为Setter方法
				setter = method;
			}
			if (null != getter && null != setter) {
				// 如果Getter和Setter方法都找到了，不再继续寻找
				break;
			}
		}
		return new PropDesc(field, getter, setter);
	}
253661
static FieldPath fromDotSeparatedString(String field) {
    if (PROHIBITED_CHARACTERS.matcher(field).matches()) {
      throw new IllegalArgumentException("Use FieldPath.of() for field names containing '˜*/[]'.");
    }
    return empty().append(field);
  }
296281
String getCppName(Field field) {
        ClassMapping mapping = mappings.get(field.getDeclaringClass());

        if (mapping != null) {
            Wrappe wrappedField = mapping.getStaticFields().findWrappe(field.getName());
            if (wrappedField != null && !Utils.isNullOrEmpty(wrappedField.getCppName())) {
                return wrappedField.getCppName();
            }
        }
        Java4CppWrappe annot = field.getAnnotation(Java4CppWrappe.class);
        if (annot != null && !Utils.isNullOrEmpty(annot.value())) {
            return annot.value();
        }
        return mappings.escapeName(field.getName());
    }
835341
public Set<Member> getFieldUsage(Field field) {
        return getMembersFromDescriptors(store.get(index(MemberUsageScanner.class), name(field)));
    }
1074826
private String convertFieldValue(final Field field,
                                     final ExportContainer container) {
        final boolean isArray2D = (container.getType() == FieldContainer.Type.ARRAY_2D);
        if (field.getType().equals(String.class)) {
            return wrapWithComma(container.getExportValue());
        } else if (isTypeTimestampConvertible(field)) {
            return wrapWithComma(String.valueOf(convertFieldValueToTimestamp(field, container)));
        } else if (container.getType() == FieldContainer.Type.ARRAY
                || isArray2D
                || container.getType() == FieldContainer.Type.COLLECTION) {

            final Class<?> componentType = extractType(container.getType(), field);
            final String sqlType = dataTypes.getOrDefault(componentType, "VARCHAR");
            final String result = (sqlType.equals("VARCHAR") || sqlType.equals("CHAR"))
                    ? container.getExportValue().replace("[", "{\"").replace("]", "\"}").replace(",", "\",\"").replace(" ", "")
                    : container.getExportValue().replace("[", "{").replace("]", "}");
            return wrapWithComma(result);
        }

        return container.getExportValue();
    }
839375
public int getRawFieldData(Convert field)
    {
        if (this.getKey() == null)
            this.setKey(field.getFieldName());
        Object objValue = this.get();
        if ((objValue == null) || (objValue.getClass() == field.getField().getDataClass()))
            return field.setData(objValue); // Should call here
        else
            return field.setString(this.getString());
    }
970144
private int findField(String fieldName) {
		int foundIndex = 0;
		for (Field field : fields) {
			if (field != null && fieldName.equals(field.getName())) {
				return foundIndex;
			}

			foundIndex++;
		}

		return -1;
	}
692198
public static <T> List<List<T>> groupByField(Collection<T> collection, final String fieldName) {
		return group(collection, new Hash<T>() {
			private List<Object> fieldNameList = new ArrayList<>();

			@Override
			public int hash(T t) {
				if (null == t || false == BeanUtil.isBean(t.getClass())) {
					// 非Bean放在同一子分组中
					return 0;
				}
				final Object value = ReflectUtil.getFieldValue(t, fieldName);
				int hash = fieldNameList.indexOf(value);
				if (hash < 0) {
					fieldNameList.add(value);
					return fieldNameList.size() - 1;
				} else {
					return hash;
				}
			}
		});
	}
37041
public static String getMapSetterName(Field field) {
        if (field.isMap()) {
            return SETTER_PREFIX + Formatter.toPascalCase(field.getName()) + MAP_SUFFIX;
        }
        throw new IllegalArgumentException(field.toString());
    }