Here you can find the source of toSetterName(String fieldName)
public static String toSetterName(String fieldName)
//package com.java2s; //License from project: Apache License public class Main { public static String toSetterName(String fieldName) { return toAccessorName(fieldName, "set"); }//from w ww . j av a 2 s . co m private static String toAccessorName(String fieldName, String accessorTypeName) { if (fieldName == null || fieldName.equals("")) { throw new IllegalArgumentException("argument is empty"); } String ret = fieldName.substring(0, 1).toUpperCase(); if (fieldName.length() > 1) { ret = ret + fieldName.substring(1); } return accessorTypeName + ret; } }