|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
net.sf.qualitytest.exception.IllegalMissingAnnotationOnMethodException
public class IllegalMissingAnnotationOnMethodException
Thrown to indicate that an annotation is missing on a public method of a class.
| 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_METHOD_ANNOTATION_AND_CLASS
Message to indicate that the the given class with name must be annotated with annotation '%s' on method |
| Constructor Summary | |
|---|---|
IllegalMissingAnnotationOnMethodException()
Constructs an IllegalMissingAnnotationOnMethodException with the default message
DEFAULT_MESSAGE. |
|
IllegalMissingAnnotationOnMethodException(Class<?> clazz,
Class<? extends Annotation> annotation,
Method method)
Constructs an IllegalMissingAnnotationOnMethodException with the message
IllegalMissingAnnotationOnMethodException#MESSAGE_WITH_ANNOTATION including the name of the missing
annotation. |
|
IllegalMissingAnnotationOnMethodException(Class<?> clazz,
Class<? extends Annotation> annotation,
Method method,
Throwable cause)
Constructs an IllegalMissingAnnotationOnMethodException with the message
IllegalMissingAnnotationOnMethodException#MESSAGE_WITH_ANNOTATION including the name of the missing
annotation. |
|
IllegalMissingAnnotationOnMethodException(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. |
Method |
getMethodWithoutAnnotation()
Gives access to the method 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_METHOD_ANNOTATION_AND_CLASS
| Constructor Detail |
|---|
public IllegalMissingAnnotationOnMethodException()
IllegalMissingAnnotationOnMethodException with the default message
DEFAULT_MESSAGE.
public IllegalMissingAnnotationOnMethodException(@Nonnull
Class<?> clazz,
@Nonnull
Class<? extends Annotation> annotation,
@Nonnull
Method method)
IllegalMissingAnnotationOnMethodException with the message
IllegalMissingAnnotationOnMethodException#MESSAGE_WITH_ANNOTATION including the name of the missing
annotation.
clazz - the name of the class causing the errorannotation - the name of the required annotationmethod - the method causing the exception
public IllegalMissingAnnotationOnMethodException(@Nonnull
Class<?> clazz,
@Nonnull
Class<? extends Annotation> annotation,
@Nonnull
Method method,
@Nullable
Throwable cause)
IllegalMissingAnnotationOnMethodException with the message
IllegalMissingAnnotationOnMethodException#MESSAGE_WITH_ANNOTATION including the name of the missing
annotation.
clazz - the name of the class causing the errorannotation - the name of the required annotationmethod - the method causing the exceptioncause - 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 IllegalMissingAnnotationOnMethodException(@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<?> getClassWithoutAnnotation()
public Method getMethodWithoutAnnotation()
public Class<? extends Annotation> getMissingAnnotation()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||