MCPcopy
hub / github.com/razerdp/BasePopup / field

Method field

app/src/main/java/razerdp/demo/utils/joor/Reflect.java:360–367  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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();

Callers 2

getMethod · 0.95
fieldsMethod · 0.95

Calls 4

field0Method · 0.95
onMethod · 0.95
getTypeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected