public static void setProperty(final Object object, final String property,
			final Class propertyType, final Object value) {
		Class[] paramTypes = new Class[]{propertyType};
		Object[] params = new Object[]{value};
		String methodName = "set" + property.substring(0, 1).toUpperCase() + property.substring(1);

		ReflectionUtil.invokeMethod(object, methodName, params, paramTypes);
	}
public static void setProperty ( final Object object , final String property , final Class propertyType , final Object value ) { Class [ ] paramTypes = new Class [ ] { propertyType } ; Object [ ] params = new Object [ ] { value } ; String methodName = "set" + property . substring ( 0 , 1 ) . toUpperCase ( ) + property . substring ( 1 ) ; ReflectionUtil . invokeMethod ( object , methodName , params , paramTypes ) ; }
This method sets a property on an object via reflection.

@param object The object on which the property is to be set.
@param property The name of the property to be set.
@param propertyType The type of the property being set.
@param value The value of the property being set.