From f0151f2c8d85b7fce92cfa1546484ba6b8229740 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sat, 24 Sep 2022 13:38:00 +0200 Subject: [PATCH] Update some stuff --- src/de/steamwar/linkage/LinkageProcessor.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/de/steamwar/linkage/LinkageProcessor.java b/src/de/steamwar/linkage/LinkageProcessor.java index 83f6794..f2f245c 100644 --- a/src/de/steamwar/linkage/LinkageProcessor.java +++ b/src/de/steamwar/linkage/LinkageProcessor.java @@ -166,7 +166,9 @@ public class LinkageProcessor extends AbstractProcessor { } neededFields.forEach((s, typeElement) -> { buildPlan.addImport(typeElement.getQualifiedName().toString()); - buildPlan.addField(new FieldBuilder(typeElement.getSimpleName().toString(), typeElement.getSimpleName().toString(), "new " + typeElement.getSimpleName().toString() + "()")); + String t = typeElement.getSimpleName().toString(); + t = t.substring(0, 1).toLowerCase() + t.substring(1); + buildPlan.addField(new FieldBuilder(typeElement.getSimpleName().toString(), t, "new " + typeElement.getSimpleName().toString() + "()")); }); Map methods = new HashMap<>(); @@ -205,7 +207,8 @@ public class LinkageProcessor extends AbstractProcessor { private String getElement(TypeElement typeElement, Map neededFields) { if (neededFields.containsKey(typeElement.getQualifiedName().toString())) { - return typeElement.getSimpleName().toString(); + String s = typeElement.getSimpleName().toString(); + return s.substring(0, 1).toLowerCase() + s.substring(1); } return "new " + typeElement.getSimpleName().toString() + "()"; }