Get a wrapped field. This is roughly equivalent to Field#get(Object). If the wrapped object is a Class, then this will wrap a static member field. If the wrapped object is any other Object, then this wrap an instance member field. @param name The field name @return The w
(String name)
| 358 | * @throws ReflectException If any reflection exception occurred. |
| 359 | */ |
| 360 | public Reflect field(String name) throws ReflectException { |
| 361 | try { |
| 362 | Field field = field0(name); |
| 363 | return on(field.getType(), field.get(object)); |
| 364 | } catch (Exception e) { |
| 365 | throw new ReflectException(e); |
| 366 | } |
| 367 | } |
| 368 | |
| 369 | private Field field0(String name) throws ReflectException { |
| 370 | Class<?> t = type(); |