Java注解(annotation)概述
2017-12-27 09:30
447 查看
Annotations, a form of metadata, provide data about a program that is not part of the program itself. Annotations have no direct effect on the operation of the code they annotate。
Compile-time and deployment-time processing — Software tools can process annotation information to generate code, XML files, and so forth.
Runtime processing— Some annotations are available to be examined at runtime.
为编译器提供辅助信息 — Annotations可以为编译器提供而外信息,以便于检测错误,抑制警告等.
编译源代码时进行而外操作 — 软件工具可以通过处理Annotation信息来生成原代码,xml文件等等.
运行时处理 — 有一些annotation甚至可以在程序运行时被检测,使用.
http://hannesdorfmann.com/annotation-processing/annotationprocessing101
http://blog.csdn.net/xfxyy_sxfancy/article/details/44275549#t3
一般来说Annotation有如下三种使用情形:
Information for the compiler — Annotations can be used by the compiler to detect errors or suppress * warnings.**Compile-time and deployment-time processing — Software tools can process annotation information to generate code, XML files, and so forth.
Runtime processing— Some annotations are available to be examined at runtime.
为编译器提供辅助信息 — Annotations可以为编译器提供而外信息,以便于检测错误,抑制警告等.
编译源代码时进行而外操作 — 软件工具可以通过处理Annotation信息来生成原代码,xml文件等等.
运行时处理 — 有一些annotation甚至可以在程序运行时被检测,使用.
参考资料:
https://www.race604.com/annotation-processing/http://hannesdorfmann.com/annotation-processing/annotationprocessing101
http://blog.csdn.net/xfxyy_sxfancy/article/details/44275549#t3
相关文章推荐
- Java注解(一)Annotation的概述和语
- 黑马程序员——JAVA高新技术---注解Annotation---概述,java的三种注解,元注解
- Java注解(Annotation)详解(一)——概述及JDK自带注解
- Java注解(Annotation)详解(一)——概述及JDK自带注解
- Java Annotation(注解)
- Java同步注解(Annotation)---学习收获
- 【java总结】注解Annotation
- java注解annotation,自定义注解--shanchu
- 深入理解Java:注解(Annotation)--注解处理器
- Java Annotation 及几个常用开源项目注解原理简析
- 深入理解Java:注解(Annotation)自定义注解入门
- Java 之 Annotation(注解)介绍
- Java的注解(Annotation)
- Java注解Annotation学习笔记
- 深入理解Java:注解(Annotation)自定义注解入门
- 【黑马程序员】java基础加强-------注解(annotation)
- Java基础加强总结(一)——注解(Annotation)
- 深入理解java注解(Annotation)以及 自定义注解入门
- java注解annotation的解释
- java language specification 翻译 9.6 Annotation Types 注解类型