FieldInstance { @Nullable FieldInstance locateField() { fieldMap = FieldMapper.getFieldMap(containingObject.getClass()); field = fieldMap.getField(name[nameIndex]); if (field == null) { return null; } if (nameIndex + 1 < name.length) { if (field.hasChildFields()) { nameIndex++; containingObject = field.getValue(containingObject); if (containingObject == null) { return null; } return locateField(); } else { return null; } } return this; } FieldInstance(Object parentObject, @NotNull String... name); @NotNull Class getType(); @Nullable Class getCollectionType(); @Nullable Object getValue(); void setValue(@Nullable Object value); Validator getValidator(); boolean isImmutable(); @NotNull PropertyHandler getPropertyHandler();  }
@Test public void testLocateField() throws Exception { Child child = new Child(true); Parent parent = new Parent(child); FieldInstance fieldInstance = Field.getInstance(parent, "achild", "aboolean"); assertNotNull(fieldInstance); assertTrue((Boolean) fieldInstance.getValue()); fieldInstance.setValue(false); assertFalse((Boolean) fieldInstance.getValue()); }