Here you can find the source of toSetterName(String field)
private static String toSetterName(String field)
//package com.java2s; //License from project: Open Source License public class Main { private static String toSetterName(String field) { if (field.length() >= 2 && Character.isUpperCase(field.charAt(1))) { return "set" + field; }// w ww . j a v a2s . c o m return "set" + field.substring(0, 1).toUpperCase() + field.substring(1); } }