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.
See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
assertNoInvalidAnnotations
(MethodInfo onMethod, Class<? extends Annotation>... types) Throws anInvalidAnnotationException
if the specified method contains any of the specified annotations.Methods inherited from class org.apache.juneau.BasicRuntimeException
assertModifiable, fillInStackTrace, getCause, getMessage, initCause, isUnmodifiable, setMessage, setStackTrace, setUnmodifiable, unwrap
Methods inherited from class java.lang.Throwable
addSuppressed, getCause, getLocalizedMessage, getStackTrace, getSuppressed, printStackTrace, printStackTrace, printStackTrace, 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 anInvalidAnnotationException
if 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.
-