什么是Java注释处理? [英] What is annotation processing in Java?
问题描述
报价, Sun的官方Java教程
类名,HelloWorldApp的',只是
如果接受注释处理是
明确要求
Class names, 'HelloWorldApp', are only accepted if annotation processing is explicitly requested
这是什么意思?以及如何应用呢?
What does it mean? And how to apply it?
推荐答案
标注处理是钩到Java编译器的编译过程中,要分析源$ C $ C用户定义的注释,然后处理(由生产编译器错误,编译器警告,emmiting源$ C $ C,字节code ...)。
"Annotation Processing" is a hook into the compile process of the java compiler, to analyse the source code for user defined annotations and handle then (by producing compiler errors, compiler warning, emmiting source code, byte code ...).
<一个href=\"http://java.sun.com/javase/6/docs/api/javax/annotation/processing/package-summary.html\">http://java.sun.com/javase/6/docs/api/javax/annotation/processing/package-summary.html
这篇关于什么是Java注释处理?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!