Here you can find the source of getGetterName(Field field)
public static String getGetterName(Field field)
//package com.java2s; //License from project: Apache License import java.lang.reflect.Field; import java.util.Locale; public class Main { public static String getGetterName(Field field) { String name = field.getName(); if (field.getType().equals(boolean.class)) { return "is" + name.substring(0, 1).toUpperCase(Locale.US) + name.substring(1); } else {/*from w ww .j a v a2 s. c o m*/ return "get" + name.substring(0, 1).toUpperCase(Locale.US) + name.substring(1); } } }