Serializable
public class AnnotationTypeMismatchException extends RuntimeException
Constructor | Description |
---|---|
AnnotationTypeMismatchException |
Constructs an AnnotationTypeMismatchException for the specified annotation type element and found data type. |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public AnnotationTypeMismatchException(Method element, String foundType)
element
- the Method
object for the annotation element, may be null
foundType
- the (erroneous) type of data found in the annotation. This string may, but is not required to, contain the value as well. The exact format of the string is unspecified, may be null
.public Method element()
Method
object for the incorrectly typed element. The value may be unavailable if this exception has been serialized and then read back in.Method
object for the incorrectly typed element, or null
if unavailablepublic String foundType()
null
.
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/annotation/AnnotationTypeMismatchException.html