java Annotation Meta-annotations
2014-04-27 21:15
169 查看
Meta-annotations
@Target
CONSTRUCTOR: Constructor declaration
FIELD: Field declaration (includes enum constants)
LOCAL_VARIABLE: Local variable declaration METHOD: Method declaration
PACKAGE: Package declaration
PARAMETER: Parameter declaration
TYPE: Class, interface (including annotation type),or enum declaration
@Retention
SOURCE: Annotations are discarded by thecompiler.
CLASS: Annotations are available in the class file by the compiler but can be discarded by the VM.
RUNTIME: Annotations are retained by the VM at run time, so they may be read reflectively.
@Documented
Include this annotation in the Javadocs.
@Inherited
Allow subclasses to inherit parent annotations.
@Target
CONSTRUCTOR: Constructor declaration
FIELD: Field declaration (includes enum constants)
LOCAL_VARIABLE: Local variable declaration METHOD: Method declaration
PACKAGE: Package declaration
PARAMETER: Parameter declaration
TYPE: Class, interface (including annotation type),or enum declaration
@Retention
SOURCE: Annotations are discarded by thecompiler.
CLASS: Annotations are available in the class file by the compiler but can be discarded by the VM.
RUNTIME: Annotations are retained by the VM at run time, so they may be read reflectively.
@Documented
Include this annotation in the Javadocs.
@Inherited
Allow subclasses to inherit parent annotations.
相关文章推荐
- 自定义Java Annotations实例以及用Java Reflection来解析自定义的Annotation
- 自定义Java Annotations实例以及用Java Reflection来解析自定义的Annotation
- Java Annotations Tutorial with Custom Annotation
- Java:元注解(Meta-Annotation)详解
- Java5.0的元注解(meta-annotations)
- Java Meta Annotation & Spring Annotation
- Java8内存模型—永久代(PermGen)和元空间(Metaspace)
- Caused by: java.lang.ClassNotFoundException: org.aspectj.lang.annotation.Around
- 深入理解Java:注解(Annotation)自定义注解入门
- Java Annotation 高级应用
- Java 注解(Annotation)介绍
- 深入理解Java:注解(Annotation)基本概念
- Java Annotation(Java 注解)的实现代码
- hibernate3.6finald的Annotation实现实体类与数据库表的映射关系(不再需要hibernate-annotations.jar hibernate-commons-annota)
- JAVA基础————两分钟看懂注解Annotation
- Java Android Annotation深入理解
- Java Annotation 注解
- Java高级系列——注解(Annotations)
- java 自定义Annotation
- Java Annotation 入门