请教反射高手!如何通过反射将对象的字段转型
class test
{
public int a ;
public static void main(String[] args)
{
test intense=new test();
Clss aClass=Class.forName("test");
Filed aFiled=s.getField("d");
string waitToCastType="String";
//现在就是怎么通过waitToCastType的值将 intense的对象动态转化为String 类型,
//不允许直接用String,要用“String”去转,反射高手指教下小弟啊
}
}