Java 编译器上下文中的 'generated source files' 是什么?

What are 'generated source files' in Java compiler context?

关于 javac 的 Oracle 文档说 -s 开关用于指定放置生成的源文件的目录。那些 'generated source files' 是什么?为什么需要它们?我一直认为源文件是 'generated' 由 humanware...

这似乎与 javacAnnotation Processing 部分有关。显然,您可以在编译人工生成的源代码时使用注释处理器,这些处理器可能会生成源文件作为处理某些注释的一部分:

If any processors generate new source files, then another round of annotation processing occurs: Any newly generated source files are scanned, and the annotations processed as before. Any processors called on previous rounds are also called on all subsequent rounds. This continues until no new source files are generated.

After a round occurs where no new source files are generated, the annotation processors are called one last time, to give them a chance to complete any remaining work. Finally, unless the -proc:only option is used, the compiler compiles the original and all generated source files.