Java Annotation 注解

Annotations Gotchas and Best Practices:
[url]http://willcode4beer.com/design.jsp?set=annotations_gotchas_best_practices[/url]

[b]写的非常全面实用的一个Java Annotation系列:[/b]
作者:cleverpig
作者Blog:[url]http://blog.matrix.org.cn/page/cleverpig[/url]
一 [color=red]Java Annotation入门[/color]
[b][url]http://blog.csdn.net/dongtg/archive/2007/09/06/1774101.aspx[/url][/b]
二 [color=red]Java Annotation手册[/color]
[b][url]http://blog.csdn.net/dongtg/archive/2007/09/06/1774102.aspx[/url][/b]
三 [color=red]Java Annotation 高级应用[/color]
[b][url]http://blog.csdn.net/dongtg/archive/2007/09/06/1774104.aspx[/url][/b]


Annotations Types:
1. 13. 1. Annotations and Annotation Types:
[url]http://www.java2s.com/Tutorial/Java/0020__Language/AnnotationsandAnnotationTypes.htm[/url][quote]Annotations are notes in Java programs to instruct the Java compiler to do something. Java provides three standard annotations and four standard meta-annotations.

1 An annotation type is a special interface type.
2 An annotation is an instance of an annotation type.
3 An annotation type has a name and members.
4 The information contained in an annotation takes the form of key/value pairs.
5 There can be zero or multiple pairs and each key has a specific type.
6 It can be a String, int, or other Java types.
7 Annotation types with no key/value pairs are called marker annotation types.
8 Those with one key/value pair are referred to single-value annotation types.

1 There are three annotation types in Java 5: Deprecated, Override, and Suppress Warnings.
2 There are four other annotation types that are part of the java.lang.annotation package: Documented, Inherited, Retention, and Target.
3 These four annotation types are used to annotate annotations,[/quote]1. 13. 2 - 1. 13. 9见上链接页面。


Meta-Annotations:
[url]http://en.wikibooks.org/wiki/Java_Programming/Annotations/Meta-Annotations[/url][quote]There are four annotation types in the java.lang.annotation package. These so-called meta-annotations are used to annotate other annotation types.
1 Documented
2 Inherited
3 Retention
4 Target
[/quote]


设计自己的Annotation:
[url]http://www.iteye.com/topic/36659[/url]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值