public class AnnotationTypeMismatchException extends RuntimeException
AnnotatedElement
,
Serialized FormConstructor and Description |
---|
AnnotationTypeMismatchException(Method element,
String foundType)
Constructs an AnnotationTypeMismatchException for the specified
annotation type element and found data type.
|
Modifier and Type | Method and Description |
---|---|
Method |
element()
Returns the Method object for the incorrectly typed element.
|
String |
foundType()
Returns the type of data found in the incorrectly typed element.
|
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 elementfoundType
- 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.public Method element()
public String foundType()
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2020, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.