Package uk.blankaspect.common.jsonxml
Class ElementKind.UnexpectedKindException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
uk.blankaspect.common.jsonxml.ElementKind.UnexpectedKindException
- All Implemented Interfaces:
Serializable
- Enclosing class:
ElementKind
This class implements an unchecked exception that may be thrown if an XML element is encountered where a
JSON-XML element is expected.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance of an exception with no detail message.UnexpectedKindException
(String message) Creates a new instance of an exception with the specified detail message. -
Method Summary
Modifier and TypeMethodDescriptionCreates and returns a new instance ofUnexpectedKindException
whose detail message includes the specified name of an element of an unexpected kind.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
UnexpectedKindException
public UnexpectedKindException()Creates a new instance of an exception with no detail message. -
UnexpectedKindException
Creates a new instance of an exception with the specified detail message.- Parameters:
message
- the detail message.
-
-
Method Details
-
of
Creates and returns a new instance ofUnexpectedKindException
whose detail message includes the specified name of an element of an unexpected kind.- Parameters:
name
- the name of an element of an unexpected kind.- Returns:
- a new instance of
UnexpectedKindException
.
-