@@ -0,0 +1,1772 @@
+package com.ifeng.at.testagent.reflect;%0A%0A%0Aimport java.lang.reflect.Field;%0A%0Apublic class DataInterfaceHelper %7B%0A    private static String HTTP_VCIS_IFENG_COM = %22http://vcis.ifeng.com%22;%0A    private static String HTTP_VCSP_IFENG_COM = %22http://vcsp.ifeng.com%22;%0A    private static String HTTP_V_IFENG_COM = %22http://v.ifeng.com%22;%0A    private static String HTTP_COMMENT_IFENG_COM = %22http://comment.ifeng.com%22;%0A%0A    public static void setHost(String host) throws ClassNotFoundException, IllegalAccessException %7B%0A        String className = %22com.ifeng.video.dao.db.constants.DataInterface%22;%0A        Class dataInterface = Class.forName(className);%0A        Field%5B%5D fields = dataInterface.getDeclaredFields();%0A        for(Field field: fields)%7B%0A            if(field.getType() == String.class)%7B%0A                modifyHost(dataInterface, field, host);%0A            %7D%0A        %7D%0A    %7D%0A%0A    private static void modifyHost(Object instance, Field field, String host) throws IllegalAccessException %7B%0A        field.setAccessible(true);%0A        String value = (String) field.get(instance);%0A        if(value.startsWith(HTTP_VCIS_IFENG_COM))%7B%0A            value = value.replaceFirst(HTTP_VCIS_IFENG_COM, %22http://%22+host);%0A            field.set(instance, value);%0A        %7Delse if(value.startsWith(HTTP_VCSP_IFENG_COM))%7B%0A            value = value.replaceFirst(HTTP_VCSP_IFENG_COM, %22http://%22+host);%0A            field.set(instance, value);%0A        %7Delse if(value.startsWith(HTTP_V_IFENG_COM))%7B%0A            value = value.replaceFirst(HTTP_V_IFENG_COM, %22http://%22+host);%0A            field.set(instance, value);%0A        %7Delse if(value.startsWith(HTTP_COMMENT_IFENG_COM))%7B%0A            value = value.replaceFirst(HTTP_COMMENT_IFENG_COM, %22http://%22+host);%0A            field.set(instance, value);%0A        %7D%0A    %7D%0A%7D%0A

Add url reflection helper