|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Exception java.lang.RuntimeException net.sf.qualitycheck.exception.IllegalMissingAnnotationException
public class IllegalMissingAnnotationException
Thrown to indicate that a method has been passed with a class that does not have a required annotation.
Field Summary | |
---|---|
protected static String |
DEFAULT_MESSAGE
Default message to indicate that the a given class must have an annotation. |
protected static String |
MESSAGE_WITH_ANNOTATION
Message to indicate that the the given class must be annotated with annotation '%s'. |
protected static String |
MESSAGE_WITH_ANNOTATION_AND_CLASS
Message to indicate that the the given class with name must be annotated with annotation '%s'. |
Constructor Summary | |
---|---|
IllegalMissingAnnotationException()
Constructs an IllegalMissingAnnotationException with the default message
DEFAULT_MESSAGE . |
|
IllegalMissingAnnotationException(Class<? extends Annotation> annotation)
Constructs an IllegalMissingAnnotationException with the message
MESSAGE_WITH_ANNOTATION including the name of the missing annotation. |
|
IllegalMissingAnnotationException(Class<? extends Annotation> annotation,
Class<?> clazz)
Constructs an IllegalMissingAnnotationException with the message
MESSAGE_WITH_ANNOTATION including the name of the missing annotation. |
|
IllegalMissingAnnotationException(Class<? extends Annotation> annotation,
Class<?> clazz,
Throwable cause)
Constructs a new exception with the message MESSAGE_WITH_ANNOTATION
including the name of the missing annotation. |
|
IllegalMissingAnnotationException(Class<? extends Annotation> annotation,
Throwable cause)
Constructs a new exception with the message MESSAGE_WITH_ANNOTATION
including the name of the missing annotation. |
|
IllegalMissingAnnotationException(Throwable cause)
Constructs a new exception with the default message DEFAULT_MESSAGE . |
Method Summary | |
---|---|
Class<?> |
getClassWithoutAnnotation()
Gives access to the class which does not have a required annotation. |
Class<? extends Annotation> |
getMissingAnnotation()
Gives access to the required annotation. |
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 |
Field Detail |
---|
protected static final String DEFAULT_MESSAGE
protected static final String MESSAGE_WITH_ANNOTATION
protected static final String MESSAGE_WITH_ANNOTATION_AND_CLASS
Constructor Detail |
---|
public IllegalMissingAnnotationException()
IllegalMissingAnnotationException
with the default message
DEFAULT_MESSAGE
.
public IllegalMissingAnnotationException(@Nonnull Class<? extends Annotation> annotation)
IllegalMissingAnnotationException
with the message
MESSAGE_WITH_ANNOTATION
including the name of the missing annotation.
annotation
- the required annotationpublic IllegalMissingAnnotationException(@Nonnull Class<? extends Annotation> annotation, @Nullable Throwable cause)
MESSAGE_WITH_ANNOTATION
including the name of the missing annotation.
annotation
- the required annotationcause
- the cause (which is saved for later retrieval by the Throwable.getCause()
method). (A
null
value is permitted, and indicates that the cause is nonexistent or unknown.)public IllegalMissingAnnotationException(@Nonnull Class<? extends Annotation> annotation, @Nullable Class<?> clazz)
IllegalMissingAnnotationException
with the message
MESSAGE_WITH_ANNOTATION
including the name of the missing annotation.
annotation
- the required annotationclazz
- the name of the class which does not have the required annotationpublic IllegalMissingAnnotationException(@Nonnull Class<? extends Annotation> annotation, @Nullable Class<?> clazz, @Nullable Throwable cause)
MESSAGE_WITH_ANNOTATION
including the name of the missing annotation.
annotation
- the required annotationclazz
- the name of the class which does not have the required annotationcause
- the cause (which is saved for later retrieval by the Throwable.getCause()
method). (A
null
value is permitted, and indicates that the cause is nonexistent or unknown.)public IllegalMissingAnnotationException(@Nullable Throwable cause)
DEFAULT_MESSAGE
.
cause
- the cause (which is saved for later retrieval by the Throwable.getCause()
method). (A
null
value is permitted, and indicates that the cause is nonexistent or unknown.)Method Detail |
---|
public Class<? extends Annotation> getMissingAnnotation()
public Class<?> getClassWithoutAnnotation()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |