void (Object container) { Class<?> aClass = container.getClass(); Field[] fields = aClass.getDeclaredFields(); for (Field field : fields) { field.setAccessible(true); try { Object o = field.get(container); if (!(o instanceof IElementType elementType)) { Assert.fail("Object: " + o + " is not IElementType"); return; } if (!(elementType instanceof ParentProviderElementType parentProviderElementType)) { Assert.fail(elementType + " must inherit ParentProviderElementType to use in Frontend part"); return; } if (!ContainerUtil.or(parentProviderElementType.getParents(), parent -> parent.getDebugName().equals(elementType.getDebugName()) && parent.getLanguage().equals(elementType.getLanguage()) && elementType.isLeftBound() == parent.isLeftBound())) { Assert.fail(elementType + " must contain parents, which can replace it in Frontend part. Found: " + Strings.join(parentProviderElementType.getParents(), ", ")); } } catch (IllegalAccessException e) { Assert.fail(e.getMessage()); } } }