目录
Java 注解源码分析..........................................................................................................................2
1、 Annotation 架构 ...............................................................................................................2
2、 主干 ..................................................................................................................................3
2.1Annotation 接口 ..........................................................................................................3
2.2RetentionPolicy 类.......................................................................................................4
(1) SOURCE.......................................................................................................................4
(2) CLASS ........................................................................................................................4
(3) RUNTIME.....................................................................................................................4
2.3ElementType 类 ...........................................................................................................5
(1) TYPE ..........................................................................................................................5
(2) FIELD ........................................................................................................................5
(3) METHOD.......................................................................................................................5
(4) PARAMETER.................................................................................................................5
(5) CONSTRUCTOR.............................................................................................................5
(6) LOCAL_VARIABLE.......................................................................................................5
(7) ANNOTATION_TYPE.....................................................................................................5
(8) PACKAGE.....................................................................................................................5
3、 重要实现类 ......................................................................................................................6
3.1@Override....................................................................................................................6
3.2@Retention..................................................................................................................6
3.3@Target .......................................................................................................................6
3.4@Documented.............................................................................................................7
3.5@FunctionalInterface ..................................................................................................7
4.6@Deprecated ...............................................................................................................7
4.7@SafeVarargs...............................................................................................................7
4.8@SuppressWarnings ....................................................................................................8
4.9@Inherited ...................................................................................................................8