class ReflectionUtils {

    public static void setProperty( Object object, String name, String value )
    {
        Object[] arguments = new Object[]{ value };

        Class<?>[] parameterTypes = new Class<?>[]{ String.class };

        if ( name.length() > 0 )
        {
            name = "set" + name.substring( 0, 1 ).toUpperCase() + name.substring( 1, name.length() );

            try
            {
                Method concatMethod = object.getClass().getMethod( name, parameterTypes );

                concatMethod.invoke( object, arguments );
            }
            catch ( Exception ex )
            {
                throw new UnsupportedOperationException( "Failed to set property", ex );
            }
        }
    }

}