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]
[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]