one more example

This commit is contained in:
2026-06-07 09:58:39 +02:00
parent b268639074
commit 2ecc8e08de
13 changed files with 423 additions and 15 deletions

View File

@@ -45,11 +45,8 @@ public class Main {
new Scxml()
);
List<TypeDeclaration> entryPoints = context.findEntryPointClasses(TARGET_ANNOTATIONS);
for (TypeDeclaration td : entryPoints) {
processEntryPoint(td, outputs, outputDir, context);
}
exportAll(context, outputs, outputDir);
// Still handle methods returning StateMachine for now (might be harder to refactor to CodebaseContext)
AstFileFinder finder = new AstFileFinder();
List<Path> javaFiles = FileUtils.findFilesWithExtension(Set.of(inputDir), EXTENSION);
@@ -61,6 +58,13 @@ public class Main {
}
}
public static void exportAll(CodebaseContext context, List<StateMachineExporter> outputs, Path outputDir) throws IOException {
List<TypeDeclaration> entryPoints = context.findEntryPointClasses(TARGET_ANNOTATIONS);
for (TypeDeclaration td : entryPoints) {
processEntryPoint(td, outputs, outputDir, context);
}
}
static void processEntryPoint(TypeDeclaration td, List<StateMachineExporter> outputs, Path outputDir, CodebaseContext context) throws IOException {
String className = td.getName().getFullyQualifiedName();
System.out.println("Processing state machine config: " + className);