我正在使用注释处理来生成一些代码,我需要在特定包中创建 kotlin 文件这是我的代码
@AutoService(Processor.class)
@IncrementalAnnotationProcessor(IncrementalAnnotationProcessorType.DYNAMIC)
@SuppressWarnings("NullAway")
public final class MyProcessor extends AbstractProcessor {
@Override
public boolean process(Set<? extends TypeElement> set, RoundEnvironment roundEnvironment) {
....
}
private void writeKotlinFile(String pack, String fileName, String fileContent, Element it) {
.....
}
}
Run Code Online (Sandbox Code Playgroud)