Here you can find the source of toGetterName(String name)
public static String toGetterName(String name)
//package com.java2s; //License from project: BSD License public class Main { public static String toGetterName(String name) { return tohPrefixialCamelName(name, "get"); }//from ww w . j ava 2 s .c om public static String tohPrefixialCamelName(String name, String prefix) { if (name == null || name.length() == 0) { return ""; } StringBuffer buffer = new StringBuffer(); String camelName = toCamelName(name); return buffer.append(prefix).append(camelName).toString(); } public static String toCamelName(String name) { if (name == null || name.length() == 0) { return ""; } char firstChar = name.charAt(0); if (!Character.isLetter(firstChar)) { return name; } char upperChar = Character.toUpperCase(firstChar); StringBuffer buffer = new StringBuffer(); return buffer.append(upperChar).append(name.substring(1, name.length())).toString(); } }