Fix initializer methods
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2022-09-22 12:21:30 +02:00
Ursprung 05f5d3f7b3
Commit a58dd0698f

Datei anzeigen

@ -154,6 +154,7 @@ public class LinkageProcessor extends AbstractProcessor {
buildPlan.addField(new FieldBuilder(typeElement.getSimpleName().toString(), typeElement.getSimpleName().toString())); buildPlan.addField(new FieldBuilder(typeElement.getSimpleName().toString(), typeElement.getSimpleName().toString()));
MethodBuilder initializer = new MethodBuilder(typeElement.getSimpleName().toString(), typeElement.getSimpleName().toString()); MethodBuilder initializer = new MethodBuilder(typeElement.getSimpleName().toString(), typeElement.getSimpleName().toString());
initializer.setPrivate(true);
initializer.addLine("if (" + typeElement.getSimpleName().toString() + " == null) {"); initializer.addLine("if (" + typeElement.getSimpleName().toString() + " == null) {");
initializer.addLine(" " + typeElement.getSimpleName().toString() + " = new " + typeElement.getSimpleName().toString() + "();"); initializer.addLine(" " + typeElement.getSimpleName().toString() + " = new " + typeElement.getSimpleName().toString() + "();");
initializer.addLine("}"); initializer.addLine("}");