APT(注释处理工具)

编程入门 行业动态 更新时间:2024-10-12 03:17:08
本文介绍了APT(注释处理工具)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在试图找到简单的例子来理解容易命令的用法,但我无法找到这个有用的资源。

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(注释处理工具)

本文发布于:2023-11-02 12:16:56,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1552368.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:注释   工具   APT

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!