@Test(expected = NoSuchFieldException.class) public void testGetAncestors_02() throws NoSuchFieldException { List<ComplexField> ancestors = personInfo.getAncestors("pets.bla"); assertEquals("01", 2, ancestors.size()); }
public static List<ComplexField> getAncestors(ESField field) { List<ComplexField> ancestors = new ArrayList<>(3); field = field.getParent(); while (field.getParent() != null) { ancestors.add((ComplexField) field); field = field.getParent(); } return ancestors; }
MappingInfo { public static List<ComplexField> getAncestors(ESField field) { List<ComplexField> ancestors = new ArrayList<>(3); field = field.getParent(); while (field.getParent() != null) { ancestors.add((ComplexField) field); field = field.getParent(); } return ancestors; } }
MappingInfo { public static List<ComplexField> getAncestors(ESField field) { List<ComplexField> ancestors = new ArrayList<>(3); field = field.getParent(); while (field.getParent() != null) { ancestors.add((ComplexField) field); field = field.getParent(); } return ancestors; } MappingInfo(Mapping<T> mapping); }
MappingInfo { public static List<ComplexField> getAncestors(ESField field) { List<ComplexField> ancestors = new ArrayList<>(3); field = field.getParent(); while (field.getParent() != null) { ancestors.add((ComplexField) field); field = field.getParent(); } return ancestors; } MappingInfo(Mapping<T> mapping); static boolean isOrDescendsFromArray(ESField field); static List<ComplexField> getAncestors(ESField field); static String getNestedPath(ESField field); Mapping<T> getMapping(); ESField getField(String path); ESField getField(Path path); ESDataType getType(String path); List<ComplexField> getAncestors(String path); String getNestedPath(String path); String[] getPathStrings(boolean sorted); boolean isOrDescendsFromArray(String path); }
MappingInfo { public static List<ComplexField> getAncestors(ESField field) { List<ComplexField> ancestors = new ArrayList<>(3); field = field.getParent(); while (field.getParent() != null) { ancestors.add((ComplexField) field); field = field.getParent(); } return ancestors; } MappingInfo(Mapping<T> mapping); static boolean isOrDescendsFromArray(ESField field); static List<ComplexField> getAncestors(ESField field); static String getNestedPath(ESField field); Mapping<T> getMapping(); ESField getField(String path); ESField getField(Path path); ESDataType getType(String path); List<ComplexField> getAncestors(String path); String getNestedPath(String path); String[] getPathStrings(boolean sorted); boolean isOrDescendsFromArray(String path);  }