Update LinkageProcessor
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2022-09-22 13:12:51 +02:00
Ursprung 7c21034d33
Commit 7caa627c93

Datei anzeigen

@ -98,7 +98,14 @@ public class LinkageProcessor extends AbstractProcessor {
buildPlan.addImport("java.util.HashSet");
buildPlan.addField(new FieldBuilder("Set<Class<? extends LinkageType>>", "enabled", "new HashSet<>()"));
MethodBuilder runsMethod = new MethodBuilder("run", "void");
runsMethod.addParameter(new ParameterBuilder("Class<? extends LinkageType>...", "types"));
runsMethod.addLine("for (Class<? extends LinkageType> type : types) run(type);");
buildPlan.addMethod(runsMethod);
MethodBuilder runMethod = new MethodBuilder("run", "void");
runMethod.setPrivate(true);
buildPlan.addMethod(runMethod);
runMethod.addParameter(new ParameterBuilder("Class<? extends LinkageType>", "type"));
runMethod.addLine("if (!enabled.add(type)) return;");