作者:Night Silent
链接:https://www.zhihu.com/question/35221042/answer/61780857
来源:知乎
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
链接:https://www.zhihu.com/question/35221042/answer/61780857
来源:知乎
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
详情参考这里:
JEP 117: Remove the Annotation-Processing Tool (apt)
引用如下:
Goals:
Impacts:
引用如下:
Goals:
By removing apt from the JDK, annotation processing can finish transitioning
to the superior, standardized JSR 269 API.
The apt annotation processing framework is JDK-specific and dates back to JDK
5. The functionality of the API was standardized with JSR 269, which shipped
as part of Java SE 6. In JDK 7, the entirety of the apt API was deprecated.
After this change, users of annotation processing will have to use the JSR
269 annotation processing facility, which has been supported in javac since
JDK 6. Since apt is just part of the JDK and not part of Java SE, there is a
looser compatibility contract around this component than around an API in
java.* or javax.*. The removal of a command line tool from the JDK is not
unprecedented, but the removal of apt should be clearly described in the
release notes and similar documents.
取代 APT 的是更优的 JSR 269 API - "Pluggable Annotation Processing API".