Linkage #20

Zusammengeführt
Lixfel hat 24 Commits von Linkage nach master 2022-09-23 12:45:21 +02:00 zusammengeführt
Nur Änderungen aus Commit 7caa627c93 werden angezeigt - Alle Commits anzeigen

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;");