APT (Annotation Processing Tool)

▼魔方 西西 提交于 2019-11-30 08:31:06
kschneid

Here's an example of creating a Note annotation and associated processor:

APT: Compile-Time Annotation Processing with Java

Update. As of Java 1.7:

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.

Colin Pickard

The book "Core Java 2: Advanced features" has a section called The apt Tool for Source-Level Annotation Processing which might help you.

Update. As of Java 1.7:

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!