我正在试图找到简单的例子来理解容易命令的用法,但我无法找到这个有用的资源。
I was trying to find simple example to understand the usage of apt command, but I couldn't find a helpful resource for this.
我已经提到这个入门注释处理工具但我得到一个高层次的理解。而且我想写一个code测试贴切命令。有人可以张贴一个简单的例子,或更好的链路是指?
I have referred this Getting Started with the Annotation Processing Tool but I do get a high level understanding. Moreover I want to write a code to test apt command. Can somebody post a simple example or better link to refer?
推荐答案下面是创建一个注的例子注释和相关的处理器:
Here's an example of creating a Note annotation and associated processor:
APT:编译时的注解处理与Java
的更新。从Java 1.7的:的
的JSR 269,也被称为语言模型的API,有两个基本部分组成:一个API模型Java编程语言,以及用于写入注解处理器的API。此功能是通过新的选项,javac命令访问;通过包括JSR 269的支持,现在的javac类似行为的恰当命令JDK 5。
JSR 269, also known as the Language Model API, has two basic pieces: an API that models the Java programming language, and an API for writing annotation processors. This functionality is accessed through new options to the javac command; by including JSR 269 support, javac now acts analogously to the apt command in JDK 5.
更多推荐
APT(注释处理工具)
发布评论