@Override
protected String body() {
+ String parentTypeForBuilderName;
importedNames.put("genType", importedName(getType()));
importedNames.put("objects", importedName(Objects.class));
importedNames.put("object", importedName(Object.class));
importedNames.put("item", importedName(Item.class));
if (getType().getParentType() != null) {
importedNames.put("parent", importedName(getType().getParentType()));
+ parentTypeForBuilderName = getType().getParentType().getName();
} else {
- //TODO implement - get module as type
+ importedNames.put("parentTypeForBuilder", importedName(getType().getParentTypeForBuilder()));
+ parentTypeForBuilderName = getType().getParentTypeForBuilder().getName();
}
importedNames.put("augmentation", importedName(Augmentation.class));
importedNames.put("classInstMap", importedName(ClassToInstanceMap.class));
List<String> getterMethods = new ArrayList<>(Collections2.transform(properties, this::getterMethod));
return builderTemplate.render(getType(), properties, importedNames, importedNamesForProperties, augmentField,
- copyConstructorHelper, getterMethods)
+ copyConstructorHelper, getterMethods, parentTypeForBuilderName)
.body();
}