public static final Method getWriteMethod ( Class < ? > clazz , String propertyName , Class < ? > propertyType ) { String propertyNameCapitalized = capitalize ( propertyName ) ; try { return clazz . getMethod ( "set" + propertyNameCapitalized , new Class [ ] { propertyType } ) ; } catch ( Exception e ) { return null ; } }
Lookup the setter method for the given property .