Here you can find the source of getSetter(final Class> clz, final String propertyName, final Class> propertyClass)
public static Method getSetter(final Class<?> clz, final String propertyName, final Class<?> propertyClass) throws NoSuchMethodException
//package com.java2s; import java.lang.reflect.Method; public class Main { public static Method getSetter(final Class<?> clz, final String propertyName, final Class<?> propertyClass) throws NoSuchMethodException { final Class<?> setterArgs[] = new Class[1]; setterArgs[0] = propertyClass;//from w ww. j av a2 s . c o m final String setterName = "set" + propertyName.substring(0, 1).toUpperCase() + propertyName.substring(1); return clz.getMethod(setterName, setterArgs); } }