public class IncompleteAnnotationException
extends RuntimeException
| java.lang.Object | ||||
| ↳ | java.lang.Throwable | |||
| ↳ | java.lang.Exception | |||
| ↳ | java.lang.RuntimeException | |||
| ↳ | java.lang.annotation.IncompleteAnnotationException | |||
抛出以指示程序试图访问注释被编译(或序列化)后添加到注释类型定义的注释类型的元素。 如果新元素具有默认值,则不会抛出此异常。 这个例外可以由API used to read annotations reflectively抛出。
也可以看看:
Public constructors |
|
|---|---|
IncompleteAnnotationException(Class<? extends Annotation> annotationType, String elementName) 构造一个IncompleteAnnotationException,以指示指定的元素在指定的注释类型中缺失。 |
|
Public methods |
|
|---|---|
Class<? extends Annotation> |
annotationType() 返回缺少元素的注释类型的Class对象。 |
String |
elementName() 返回缺少的元素的名称。 |
Inherited methods |
|
|---|---|
java.lang.Throwable
|
|
java.lang.Object
|
|
IncompleteAnnotationException (Class<? extends Annotation> annotationType, String elementName)
构造一个IncompleteAnnotationException,以指示指定的元素在指定的注释类型中缺失。
| Parameters | |
|---|---|
annotationType |
Class: the Class object for the annotation type |
elementName |
String: the name of the missing element |
Class<? extends Annotation> annotationType ()
返回缺少元素的注释类型的Class对象。
| Returns | |
|---|---|
Class<? extends Annotation> |
the Class object for the annotation type with the missing element |
String elementName ()
返回缺少的元素的名称。
| Returns | |
|---|---|
String |
the name of the missing element |