diff --git a/src/de/steamwar/linkage/LinkageProcessor.java b/src/de/steamwar/linkage/LinkageProcessor.java index 07a4ed0..7f43a0b 100644 --- a/src/de/steamwar/linkage/LinkageProcessor.java +++ b/src/de/steamwar/linkage/LinkageProcessor.java @@ -98,7 +98,14 @@ public class LinkageProcessor extends AbstractProcessor { buildPlan.addImport("java.util.HashSet"); buildPlan.addField(new FieldBuilder("Set>", "enabled", "new HashSet<>()")); + MethodBuilder runsMethod = new MethodBuilder("run", "void"); + runsMethod.addParameter(new ParameterBuilder("Class...", "types")); + runsMethod.addLine("for (Class type : types) run(type);"); + buildPlan.addMethod(runsMethod); + + MethodBuilder runMethod = new MethodBuilder("run", "void"); + runMethod.setPrivate(true); buildPlan.addMethod(runMethod); runMethod.addParameter(new ParameterBuilder("Class", "type")); runMethod.addLine("if (!enabled.add(type)) return;");