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

Method fields

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

Get a Map containing field names and wrapped values for the fields' values. If the wrapped object is a Class, then this will return static fields. If the wrapped object is any other Object, then this will return instance fields. These two calls are equivalent on(o

()

Source from the content-addressed store, hash-verified

406 * @return A map containing field names and wrapped values.
407 */
408 public Map<String, Reflect> fields() {
409 Map<String, Reflect> result = new LinkedHashMap<String, Reflect>();
410 Class<?> t = type();
411
412 do {
413 for (Field field : t.getDeclaredFields()) {
414 if (type != object ^ Modifier.isStatic(field.getModifiers())) {
415 String name = field.getName();
416
417 if (!result.containsKey(name))
418 result.put(name, field(name));
419 }
420 }
421
422 t = t.getSuperclass();
423 }
424 while (t != null);
425
426 return result;
427 }
428
429 /**
430 * Call a method by its name.

Callers

nothing calls this directly

Calls 4

typeMethod · 0.95
fieldMethod · 0.95
putMethod · 0.80
getNameMethod · 0.45

Tested by

no test coverage detected