java Annotation Meta-annotations
标签:java annotation java
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.
java Annotation Meta-annotations
标签:java annotation java
原文地址:http://blog.csdn.net/michael10001/article/details/24601161
评论