Use Annotation processing to generate an enum with all the classes of a sealed interface
- Clone project
- Build with maven (
mvn clean install
) - Reload maven project in IDE
- you can use the FileParserEnum in the source code of module example
- https://dev.java/learn/jvm/tools/core/javac/#annotation-processing
- https://docs.oracle.com/en/java/javase/21/docs/api/java.compiler/javax/annotation/processing/Processor.html
- https://docs.oracle.com/en/java/javase/21/docs/api/java.compiler/javax/lang/model/element/package-summary.html
- https://docs.oracle.com/en/java/javase/17/language/sealed-classes-and-interfaces.html