且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

apt 警告:未找到注释处理器

更新时间:2022-06-16 04:32:52

apt 不是编译器.它处理源文件并调用 注释处理器 视情况而定.

引用入门...

命令行实用程序 apt 是注释处理工具,它根据正在检查的一组指定源文件中存在的注释来查找并执行注释处理器.

The command-line utility apt, annotation processing tool, finds and executes annotation processors based on the annotations present in the set of specified source files being examined.

您可以在源文件上运行 apt 以在构建时生成新的源文件或元数据文件.您可以运行 apt 通过javac.

You might run apt on source files to generate new source files or metadata files at build time. You can run apt via javac.

Java 中的注解有多种用途.并非所有这些都需要在构建时处理.有些用作标记,可通过检测使用以在加载时转换类.大多数仅用于运行时标记,可以由内省工具(如许多容器和依赖注入器)使用.使用注解的确切方式取决于它来自的 API.JEE5 教程描述了如何使用WebService代码>注释.

Annotations in Java can serve multiple purposes. Not all of them need to be processed at build time. Some serve as markers that can be used via instrumentation to transform classes at load time. Most are just used at runtime markers that can be used by introspection tools (like many containers and dependency injectors). Exactly how you use an annotation depends on the API it came from. The JEE5 tutorial describes how to use the WebService annotation.