java.lang.annotation
Class IncompleteAnnotationException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by java.lang.annotation.IncompleteAnnotationException
All Implemented Interfaces:
Serializable

public class IncompleteAnnotationException
extends RuntimeException

Thrown when accessing an element within an annotation which was added since compilation or serialization took place, and does not have a default value.

Since:
1.5
See Also:
Serialized Form

Constructor Summary
IncompleteAnnotationException(Class<? extends Annotation> type, String name)
          Constructs a new IncompleteAnnotationException which indicates that the element, name, was missing from the annotation, type at compile time and does not have a default value.
 
Method Summary
 Class<? extends Annotation> annotationType()
          Returns the class representing the type of annotation from which an element was missing.
 String elementName()
          Returns the name of the missing annotation element.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IncompleteAnnotationException

public IncompleteAnnotationException(Class<? extends Annotation> type,
                                     String name)
Constructs a new IncompleteAnnotationException which indicates that the element, name, was missing from the annotation, type at compile time and does not have a default value.

Parameters:
type - the type of annotation from which an element is missing.
name - the name of the missing element.
Method Detail

annotationType

public Class<? extends Annotation> annotationType()
Returns the class representing the type of annotation from which an element was missing.

Returns:
the type of annotation.

elementName

public String elementName()
Returns the name of the missing annotation element.

Returns:
the element name.