()
| 61 | } |
| 62 | |
| 63 | static void get() throws Exception { |
| 64 | // get static field |
| 65 | Field stat = U.class.getField("stat"); |
| 66 | Object o1 = stat.get(null); |
| 67 | use(o1); |
| 68 | |
| 69 | // get instance field |
| 70 | Field inst = U.class.getField("inst"); |
| 71 | Object o2 = inst.get(new U()); |
| 72 | use(o2); |
| 73 | } |
| 74 | |
| 75 | static void set() throws Exception { |
| 76 | // set static field |