1.  @Retention  :注解的保留位置

@Retention(RetentionPolicy.SOURCE)  //注解仅存在于源码中,在class字节码文件中不包含

@Retention(RetentionPolicy.CLASS)   //默认的保留策略,注解会在class字节码文件中存在,但运行时无法获得

@Retention(RetentionPolicy.RUNTIOME)  //注解会在class字节码文件中存在,在运行时可以通过反射获取到

2.  @Target : 注解的作用目标

@Target(ElementType.TYPE)  //接口、类、枚举、注解

@Target(ElementType.FIELD)  //字段、枚举的常量

@Target(ElementType.METHOD)  //方法

@Target(ElementType.PARAMETER) //方法参数

@Target(ElementType.CONSTRUCTOR)  //构造函数

@Target(ELementType.LOCAL_VARIABLE)   //局部变量

@Target(ElementType.ANNOTATION_TYPE)  //注解

@Target(ElementType.PACKAGE)  //包

3.  @Document :  说明注解将被包含在javadoc中

4.  @Inherited : 说明子类可以继承父类中的注解

@Target简单图

最新文章

  1. 模块化之Spring3.0 web fragment和gradle构建项目
  2. sae flask 微信公众平台开发
  3. WPF Datagrid multiple selecteditems in MVVM
  4. SQL Server 内存中OLTP内部机制概述(一)
  5. Visual Studio发布Web项目报错:Unable to add 'xxx' to the Web site. Unable to add file 'xxx'. The specified file could not be encrypted.
  6. miracast 协议wifi display
  7. Wunder Fund Round 2016 (Div. 1 + Div. 2 combined) B. Guess the Permutation 水题
  8. jquery的smartWizard插件使用方法
  9. python2与python3
  10. list遍历
  11. Material Design学习-----CollapsingToolbarLayout
  12. 注册登录系统项目思路 -- javaweb
  13. bootstrap轮播和百叶窗
  14. 【lamba】java 8的新特性
  15. oracle 主键,非空,检查,唯一,默认,外键约束
  16. 5款Python程序员高频使用开发工具推荐
  17. python机器学习-sklearn挖掘乳腺癌细胞(三)
  18. VisualStuido C# Files 的值“<<<<<<< .mine”无效。路径中具有非法字符。
  19. expr的字符串操作 表达式: length, index, match, substr等
  20. Net操作Excel_NPOI

热门文章

  1. ubuntu 修改hostname
  2. app内部H5测试点总结
  3. android Binder机制(一)架构设计
  4. input类型为file改变默认按钮样式
  5. Unity string 转换为 Quaternion
  6. 注意mysql connector的版本
  7. 使用 Charles 获取 https 的数据
  8. rails4 ckeditor 的部署以及 中文化
  9. 案例51-crm练习新增客户使用数据字典和ajax
  10. 关于get_magic_quotes_gpc()函数(交互数据转义的判断)