Here you can find the source of getGetter(String name, Type type)
public static String getGetter(String name, Type type)
//package com.java2s; //License from project: CDDL license import java.lang.reflect.Type; public class Main { public static String getGetter(String name, Type type) { if (name.startsWith("_")) name = name.substring(1);// w w w . j a v a2 s .c o m String prefix; if (type != null && boolean.class.equals(type)) { prefix = "is"; } else { prefix = "get"; } return prefix + name.substring(0, 1).toUpperCase() + name.substring(1); } public static String getGetter(String name) { return getGetter(name, null); } }