Package java.lang.annotation
Class IncompleteAnnotationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.annotation.IncompleteAnnotationException
- All Implemented Interfaces:
Serializable
public class IncompleteAnnotationException extends RuntimeException
Indicates that an element of an annotation type was accessed that was added
after the type was compiled or serialized. This does not apply to new
elements that have default values.
- Since:
- 1.5
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description IncompleteAnnotationException(Class<? extends Annotation> annotationType, String elementName)Constructs an instance with the incomplete annotation type and the name of the element that's missing. -
Method Summary
Modifier and Type Method Description Class<? extends Annotation>annotationType()Returns the annotation type.StringelementName()Returns the incomplete element's name.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
IncompleteAnnotationException
public IncompleteAnnotationException(Class<? extends Annotation> annotationType, String elementName)Constructs an instance with the incomplete annotation type and the name of the element that's missing.- Parameters:
annotationType- the annotation type.elementName- the name of the incomplete element.
-
-
Method Details
-
annotationType
Returns the annotation type.- Returns:
- a Class instance.
-
elementName
Returns the incomplete element's name.- Returns:
- the name of the element.
-