简体   繁体   English

注释处理器生成的引用类

[英]Referencing classes generated by annotation processor

I am working on a gwt project using a modified version of the activities and places pattern. 我正在使用活动和位置模式的修改版本进行gwt项目。 I have created an annotation and an annotation processor that will generate the activity mapper based on activity classes that have been annotated. 我创建了一个注释和一个注释处理器,它们将基于已注释的活动类生成活动映射器。 But I don't know the correct way to reference the generated class in my existing source code. 但是我不知道在我现有的源代码中引用生成的类的正确方法。 What is the correct way to reference the generated classes since they don't exist until compile time? 引用生成的类的正确方法是什么,因为它们直到编译时才存在?

您应该只能够按名称引用它们,并且在编译代码时,它将首先运行注释处理器,然后让您引用新生成的类。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM