java获取字段Get方法的简单实现

java 文章 2020-09-14 13:34 1011 0 全屏看文

AI助手支持GPT4.0

public class ReflectUtil {
	public static String getGetMethodName(String fieldName) {
		return "get" + fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1);
	}
}


可能对is开头的属性无效。

-EOF-

AI助手支持GPT4.0