APIdia Launch Partner
Top Description Fields Constructors Methods
java.lang.annotation

public Class IncompleteAnnotationException

extends RuntimeException
Class Inheritance

Thrown to indicate that a program has attempted to access an element of an annotation interface that was added to the annotation interface definition after the annotation was compiled (or serialized). This exception will not be thrown if the new element has a default value. This exception can be thrown by the API used to read annotations reflectively.
Author
Josh Bloch
Since
1.5
See Also
java.lang.reflect.AnnotatedElement

Field Summary

Modifier and TypeField and Description
private Class<? extends Annotation>
private String
private static final long

Constructor Summary

AccessConstructor and Description
public
IncompleteAnnotationException(Class<? extends Annotation>
the Class object for the annotation interface
annotationType
,
String
the name of the missing element
elementName
)

Constructs an IncompleteAnnotationException to indicate that the named element was missing from the specified annotation interface.

Method Summary

Modifier and TypeMethod and Description
public Class<? extends Annotation>

Returns:

the Class object for the annotation interface with the missing element
annotationType
()

Returns the Class object for the annotation interface with the missing element.

public String

Returns:

the name of the missing element
elementName
()

Returns the name of the missing element.

Field Detail

annotationTypeback to summary
private Class<? extends Annotation> annotationType
elementNameback to summary
private String elementName
serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.lang.RuntimeException.serialVersionUID.

Annotations
@Serial

Constructor Detail

IncompleteAnnotationExceptionback to summary
public IncompleteAnnotationException(Class<? extends Annotation> annotationType, String elementName)

Constructs an IncompleteAnnotationException to indicate that the named element was missing from the specified annotation interface.

Parameters
annotationType:Class<? extends Annotation>

the Class object for the annotation interface

elementName:String

the name of the missing element

Exceptions
NullPointerException:
if either parameter is null

Method Detail

annotationTypeback to summary
public Class<? extends Annotation> annotationType()

Returns the Class object for the annotation interface with the missing element.

Returns:Class<? extends Annotation>

the Class object for the annotation interface with the missing element

elementNameback to summary
public String elementName()

Returns the name of the missing element.

Returns:String

the name of the missing element