public class ValueCastException extends RuntimeException
RuntimeException that is thrown if a value cannot be cast to an expected target type.| Constructor and Description |
|---|
ValueCastException(Class<?> requestedType,
Object actualObject)
|
| Modifier and Type | Method and Description |
|---|---|
Optional<Object> |
getActualObject()
Returns an
Optional that might contain the object (if present) that should have been cast. |
Optional<Class<?>> |
getActualType()
|
Class<?> |
getRequestedType()
Returns the
Class that was requested as the target type. |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString@Nonnull public Class<?> getRequestedType()
Class that was requested as the target type.Class that was requested as the target type.@Nonnull public Optional<Object> getActualObject()
Optional that might contain the object (if present) that should have been cast.Optional that might contain the object (if present) that should have been cast.Copyright © 2024. All rights reserved.