Package org.apache.juneau.annotation
Class InvalidAnnotationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.juneau.BasicRuntimeException
org.apache.juneau.annotation.InvalidAnnotationException
- All Implemented Interfaces:
Serializable
Defines an invalid usage of an annotation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidassertNoInvalidAnnotations(MethodInfo onMethod, Class<? extends Annotation>... types) Throws anInvalidAnnotationExceptionif the specified method contains any of the specified annotations.setMessage(String message, Object... args) Sets the detail message on this exception.Methods inherited from class org.apache.juneau.BasicRuntimeException
getMessageMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
InvalidAnnotationException
Constructor.- Parameters:
message- Message.args- Arguments.
-
-
Method Details
-
assertNoInvalidAnnotations
@SafeVarargs public static void assertNoInvalidAnnotations(MethodInfo onMethod, Class<? extends Annotation>... types) throws InvalidAnnotationException Throws anInvalidAnnotationExceptionif the specified method contains any of the specified annotations.- Parameters:
onMethod- The method to check.types- The annotations to check for.- Throws:
InvalidAnnotationException- Annotation was used in an invalid location.
-
setMessage
Description copied from class:BasicRuntimeExceptionSets the detail message on this exception.- Overrides:
setMessagein classBasicRuntimeException- Parameters:
message- The message.args- The message args.- Returns:
- This object.
-