目标 : 标准注释 « 语言基础 « Java 教程

En
Java 教程
1. 语言基础
2. 数据类型
3. 操作符
4. 流程控制
5. 类定义
6. 开发相关
7. 反射
8. 正则表达式
9. 集合
10. 线
11. 文件
12. 泛型
13. 本土化
14. Swing
15. Swing事件
16. 二维图形
17. SWT
18. SWT 二维图形
19. 网络
20. 数据库
21. Hibernate
22. JPA
23. JSP
24. JSTL
25. Servlet
26. Web服务SOA
27. EJB3
28. Spring
29. PDF
30. 电子邮件
31. 基于J2ME
32. J2EE应用
33. XML
34. 设计模式
35. 日志
36. 安全
37. Apache工具
38. 蚂蚁编译
39. JUnit单元测试
Java
Java 教程 » 语言基础 » 标准注释 
1. 14. 14. 目标

Target indicates which program element(s) can be annotated using instances of the annotated annotation type. The value of Target is one of the members of the java.lang.annotation.ElementType enum:

  1. ANNOTATION_TYPE. The annotated annotation type can be used to annotate annotation type declaration.
  2. CONSTRUCTOR. The annotated annotation type can be used to annotate constructor declaration.
  3. FIELD. The annotated annotation type can be used to annotate field declaration.
  4. LOCAL_VARIABLE. The annotated annotation type can be used to annotate local variable declaration.
  5. METHOD. The annotated annotation type can be used to annotate method declaration.
  6. PACKAGE. The annotated annotation type can be used to annotate package declarations.
  7. PARAMETER. The annotated annotation type can be used to annotate parameter declarations.
  8. TYPE. The annotated annotation type can be used to annotate type declarations.
@Target(value=METHOD)

You can have multiple values in the Target annotation.

@Target(value={TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE})

1. 14. 标准注释
1. 14. 1. 内置说明
1. 14. 2. 标准说明:覆盖
1. 14. 3. 标准说明:过时
1. 14. 4. 如何标记方法过时?
1. 14. 5. 什么是SuppressWarnings注释?
1. 14. 6. Standard Annotations: SuppressWarnings
1. 14. 7. Insert an annotation to suppress warning
1. 14. 8. 使用覆写注释
1. 14. 9. A demo for SuppressWarnings: unchecked and fallthrough warnings
1. 14. 10. 标准元注释
1. 14. 11. 记录
1. 14. 12. 集成
1. 14. 13. 保留
1. 14. 14. 目标
www.java2java.com | Contact Us
Copyright 2010 - 2030 Java Source and Support. All rights reserved.
All other trademarks are property of their respective owners.