(Class<?> c, String name)
| 107 | } |
| 108 | |
| 109 | @SuppressWarnings("rawtypes") |
| 110 | public static Field getField(Class<?> c, String name) throws Throwable { |
| 111 | if (!h(id(c, null) + "." + name)) { |
| 112 | try { |
| 113 | Field f = c.getField(name); |
| 114 | f.setAccessible(true); |
| 115 | p(id(c, null) + "." + name, f); |
| 116 | } catch (NoSuchFieldException e) { |
| 117 | Class s = c.getSuperclass(); |
| 118 | if (null == s) { |
| 119 | throw e; |
| 120 | } |
| 121 | Field f = s.getField(name); |
| 122 | f.setAccessible(true); |
| 123 | p(id(c, null) + "." + name, f); |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | return (Field) g(id(c, null) + "." + name); |
| 128 | } |
| 129 | |
| 130 | @SuppressWarnings("rawtypes") |
| 131 | public static Field getDeclaredField(Class<?> c, String name) throws Throwable { |
no test coverage detected