Java.Lang.Annotation 命名空间

名称 说明
AnnotationFormatError

当批注分析程序尝试从类文件中读取批注并确定批注格式不正确时引发。

AnnotationTypeMismatchException

引发 以指示程序尝试访问其类型在编译后更改的批注的元素(或序列化)。

Documented

如果批注在注释 @Documented 接口 A 的声明中存在,则元素上的任何 @A 注释都被视为元素的公共协定的一部分。

DocumentedAttribute
ElementType

此枚举类的常量提供语法位置的简单分类,其中批注可能出现在Java程序中。

IncompleteAnnotationException

引发以指示程序尝试访问在编译注释后添加到批注接口定义的批注接口的元素(或序列化)。

Inherited

指示批注接口是自动继承的。

InheritedAttribute
NativeAttribute
RepeatableAttribute
Retention

指示批注接口的批注要保留多长时间。

RetentionAttribute
RetentionPolicy

批注保留策略。

Target

指示批注接口适用的上下文。

TargetAttribute

接口

名称 说明
IAnnotation

由所有批注接口扩展的公共接口。

IDocumented

如果批注在注释 @Documented 接口 A 的声明中存在,则元素上的任何 @A 注释都被视为元素的公共协定的一部分。

IInherited

指示批注接口是自动继承的。

INative

指示定义常量值的字段可以从本机代码引用。

IRepeatable

批注接口java.lang.annotation.Repeatable用于指示其声明它的批注接口(meta-)批注接口是<>可<重复的/em>。

IRetention

指示批注接口的批注要保留多长时间。

ITarget

指示批注接口适用的上下文。