Class InstanceCastException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.aquima.interactions.foundation.exception.AppException
com.aquima.interactions.profile.ProfileException
com.aquima.interactions.profile.exception.InstanceCastException
- All Implemented Interfaces:
Serializable
Exception used to indicate that an instance could not be converted/cast to the expected type.
- Since:
- 5.0
- Author:
- O. Kerpershoek
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionInstanceCastException
(IEntityInstance instance, String requiredType) Constructs the exception with the instance that could not be cast, and the type to which it should have been cast.InstanceCastException
(String instanceType, String requiredType) Constructs the exception with the actual type and the type to which the instance should have been cast. -
Method Summary
Modifier and TypeMethodDescriptionThis method returns the actual type of the instance.This method returns the type to which the instance should have been cast.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
InstanceCastException
Constructs the exception with the instance that could not be cast, and the type to which it should have been cast.- Parameters:
instance
- The instance that could not be cast to the required type.requiredType
- The type to which the instance should have been cast.
-
InstanceCastException
Constructs the exception with the actual type and the type to which the instance should have been cast.- Parameters:
instanceType
- The actual type of the instance that could not be cast.requiredType
- The type to which the instance should have been cast.
-
-
Method Details