您的位置:首页 > 编程语言 > Java开发

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.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  java annotation java