protected void validateInits(EntityType entityType, Property property) { for (String init : property.getInits()) { if (!init.startsWith("*") && property.getType() instanceof EntityType) { String initProperty = init.contains(".") ? init.substring(0, init.indexOf('.')) : init; if (!((EntityType) property.getType()).getPropertyNames().contains(initProperty)) { processingEnv .getMessager() .printMessage( Kind.ERROR, "Illegal inits of " + entityType.getFullName() + "." + property.getName() + ": " + initProperty + " not found"); } } } }