public class IncompleteAnnotationException extends RuntimeException
AnnotatedElement
, Serialized Form
Constructor and Description |
---|
IncompleteAnnotationException(类<?
extends Annotation> annotationType,
String elementName)
构造一个IncompleteAnnotationException来指示指定的元素在指定的注释类型中丢失。
|
Modifier and Type | Method and Description |
---|---|
类<? extends Annotation> |
annotationType()
返回缺少元素的注释类型的Class对象。
|
String |
elementName()
返回缺少元素的名称。
|
addSuppressed,
fillInStackTrace,
getCause, getLocalizedMessage,
getMessage, getStackTrace,
getSuppressed, initCause,
printStackTrace,
printStackTrace,
printStackTrace,
setStackTrace,
toString
public IncompleteAnnotationException(类<? extends Annotation> annotationType, String elementName)
annotationType
- 注释类型的Class对象
elementName
- 缺少元素的名称
NullPointerException
- 如果任一参数是
null
public 类<? extends Annotation> annotationType()
public String elementName()