- 1、本文档共22页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
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
- 《中国通史》文字稿第12集春秋争霸.docx
- java教程--类与对象-讲义课件(演讲稿).ppt
- Vue应用程序开发-(1).pptx
- 东北师大版社劳动实践与评价指导手册一年级上册主题二活动一寻找五彩的树叶课时课件.pptx
- 外研版英语四年级上册 Module 4 Unit 2 How much is it单元教学设计.docx
- 外研版英语四年级上册Module 4 单元整体教学设计.docx
- 6《上课之前》课件 鄂科技版 心理健康教育一年级.pptx
- 《1~5的认识》说课课件(共25张PPT)人教版一年级上册数学.pptx
- 六《解决问题(1)》说课课件 人教版 三年级上册数学.pptx
- 七《解决问题》说课课件 人教版 二年级上册数学.pptx
文档评论(0)