This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * A workaround for JavaPoet to generate a single Java file containing multiple top-level classes. | |
| * | |
| * JavaPoet's `JavaFile` natively enforces the "one top-level class per file" rule. This class renders | |
| * each [TypeSpec] to its own source and splits it into package, imports, and type body, merging | |
| * multiple definitions into a single file while de-duplicating imports. | |
| */ | |
| class MulticlassJavaFile private constructor( | |
| val packageName: String?, | |
| val fileName: String, |