package com.gyarmy.person; import java.lang.reflect.Field; import org.junit.Test; public class TestPerson { @Test public void test2() throws Exception{ Class cls1 = Class.forName("com.gyarmy.person.Person"); Field nameField = cls1.getDeclaredField("name"); //打开访问权限 nameFi...

阅读全文>>