APT (Annotation Processing Tool)

后端 未结 2 1994
太阳男子
太阳男子 2020-12-31 05:47

I was trying to find simple example to understand the usage of apt command, but I couldn\'t find a helpful resource for this.

I have referred this Getting Started wi

相关标签:
2条回答
  • 2020-12-31 06:42

    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.

    0 讨论(0)
  • 2020-12-31 06:43

    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.

    0 讨论(0)
自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题