- 1、本文档共22页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
annotation手册(annotation手册)
annotation手册(annotation手册)
What exactly is Annotation?
Annotation provides a way to associate any information with program elements or any metadata (metadata). In some ways, annotation is used as a modifier and applied to packages, types, constructs, methods, methods, member variables, parameters, declarations of local variables. This information is stored in the name=value structure of the annotation. The annotation type is an interface that provides access to its information by way of java reflection of API.
Annotation can be used to correlate any information to a program element (class, method, member variable, etc.). It is important to note that there is a basic underlying rule: annotaion does not affect the execution of program code; the execution of code is consistent regardless of the addition or deletion of annotation. In addition, although some annotation are reflected by the Java, the API method is accessed at run time, and the Java interpreter ignores these annotation at work. It is because of the Java virtual machine to ignore annotation, leading to the annotation type is no effect in the code; only through a supporting tool can access and processing of information in the annotation type. The standard annotation and meta-annotation types will be covered in this article, and the tools that accompany these annotation types are Java compilers (of course, to handle them in some special way).
For these reasons, annotation is very handy in use. A local variable can be marked as a annotation type named after NonNull as an assertion that this local variable cannot be assigned a null value. And we can write a annotation code analysis tool to parse the code with the previous variables and try to validate the assertion. Of course, the code doesnt have to be written by itself. In the JDK after installation, can be found in the JDK/bin directory called apt tool, it provides a framework for dealing with annotation: it started scanning the source code annotation, we de
您可能关注的文档
- 2009年4月贵州省高等教育自学考试日程表(In April 2009 the Guizhou province higher education self-study exam schedule).doc
- 2009年初中生物会考复习提纲(In 2009, the junior middle school biology examination review outline).doc
- 2009年名企面试题集锦之华为篇(In 2009 the HUAWEI article highlights enterprises interview questions).doc
- 2009年山西省教师资格认证考试全真模拟试卷及答案九(In 2009 Shanxi province teacher certification exam simulation papers and answers nine).doc
- 2009年春季(In the spring of 2009).doc
- 2009年江苏教师招聘(2009 Jiangsu teacher recruitment).doc
- 2009年江苏高考本二录取分数线总汇(2009 the two Jiangsu college entrance examination admission scores confluence).doc
- 2009年社会工作法规与政策(中级)模拟试题(In 2009, social work regulations and policies (intermediate) test).doc
- 2008年高考近义词辨析备考集锦(The college entrance examination in 2008 pro forma synonyms highlights).doc
- 2009中国大学本科教育(音乐学)专业排行榜(2009 Chinese undergraduate education (Music) professional rankings).doc
- 2025年小学三年级班主任志愿服务计划.docx
- 2025年低空经济无人机巡检服务商业模式与技术创新方向分析.docx
- 2024-2025学年初中音乐九年级下册人音版(2024)教学设计合集.docx
- 2024-2025学年初中音乐九年级下册湘艺版(2024)教学设计合集.docx
- 江苏省扬州市2024-2025学年高一下学期期末调研数学试卷.pdf
- 高考物理一轮复习练习卷-猜题卷:江苏卷(原卷版和解析版).pdf
- 2025年七下语文期中作文押题预测,大概率就考这9篇.doc
- 2024-2025学年初中音乐七年级上册(2024)人教版(2024)教学设计合集.docx
- 2025年中考语文押题作文(附范文8篇).doc
- 七年级道德与法治综合评价计划.docx
文档评论(0)