Here you can find the source of toGetterName(String property)
public static String toGetterName(String property)
//package com.java2s; /*// w ww .j a v a2s .c o m Milyn - Copyright (C) 2006 - 2010 This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (version 2.1) as published by the Free Software Foundation. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details: http://www.gnu.org/licenses/lgpl.txt */ public class Main { public static String toGetterName(String property) { StringBuffer getterName = new StringBuffer(); // Add the property string to the buffer... getterName.append(property); // Uppercase the first character... getterName.setCharAt(0, Character.toUpperCase(property.charAt(0))); // Prefix with "get"... getterName.insert(0, "get"); return getterName.toString(); } }