java.lang.annotation
public class: IncompleteAnnotationException [javadoc |
source]
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.annotation.IncompleteAnnotationException
All Implemented Interfaces:
Serializable
Thrown to indicate that a program has attempted to access an element of
an annotation type that was added to the annotation type definition after
the annotation was compiled (or serialized). This exception will not be
thrown if the new element has a default value.
- author:
Josh - Bloch
- since:
1.5 -
| Constructor: |
public IncompleteAnnotationException(Class annotationType,
String elementName) {
super(annotationType.getName() + " missing element " + elementName);
this.annotationType = annotationType;
this.elementName = elementName;
}
Constructs an IncompleteAnnotationException to indicate that
the named element was missing from the specified annotation type. Parameters:
annotationType - the Class object for the annotation type
elementName - the name of the missing element
|
| Methods from java.lang.Throwable: |
|---|
|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
| Methods from java.lang.Object: |
|---|
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method from java.lang.annotation.IncompleteAnnotationException Detail: |
public Class annotationType() {
return annotationType;
}
Returns the Class object for the annotation type with the
missing element. |
public String elementName() {
return elementName;
}
Returns the name of the missing element. |