Most visited

Recently visited

Added in API level 1

IncompleteAnnotationException

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抛出。

也可以看看:

摘要(Summary)

Public constructors

IncompleteAnnotationException(Class<? extends Annotation> annotationType, String elementName)

构造一个IncompleteAnnotationException,以指示指定的元素在指定的注释类型中缺失。

公共方法(Public methods)

Class<? extends Annotation> annotationType()

返回缺少元素的注释类型的Class对象。

String elementName()

返回缺少的元素的名称。

继承方法(Inherited methods)

From class java.lang.Throwable
From class java.lang.Object

Public constructors

IncompleteAnnotationException

Added in API level 1
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

公共方法(Public methods)

annotationType

Added in API level 1
Class<? extends Annotation> annotationType ()

返回缺少元素的注释类型的Class对象。

返回(Returns)
Class<? extends Annotation> the Class object for the annotation type with the missing element

elementName

Added in API level 1
String elementName ()

返回缺少的元素的名称。

返回(Returns)
String the name of the missing element

Hooray!