public class CsvDataTypeMismatchException extends CsvFieldAssignmentException
Constructor and Description |
---|
CsvDataTypeMismatchException()
Default constructor, in case no further information is necessary or
available.
|
CsvDataTypeMismatchException(Object sourceObject,
Class<?> destinationClass)
Constructor for setting the data and the class of the intended
destination field.
|
CsvDataTypeMismatchException(Object sourceObject,
Class<?> destinationClass,
String message)
Constructor for setting the data and the class of the intended
destination field along with an error message.
|
CsvDataTypeMismatchException(String message)
Constructor with a simple text.
|
Modifier and Type | Method and Description |
---|---|
Class<?> |
getDestinationClass()
Gets the type of the field to which the data were to be assigned.
|
Object |
getSourceObject()
Gets the object that was to be assigned to a field of the wrong type.
|
getLine, getLineNumber, setLine, setLineNumber
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public CsvDataTypeMismatchException()
public CsvDataTypeMismatchException(Object sourceObject, Class<?> destinationClass)
sourceObject
- Object that was to be assigned to the destination
field. This may not be available in all contexts.destinationClass
- Class of the destination field. This may not be
available in all contexts.public CsvDataTypeMismatchException(String message)
message
- Human-readable error textpublic CsvDataTypeMismatchException(Object sourceObject, Class<?> destinationClass, String message)
sourceObject
- Object that was to be assigned to the destination
field. This may not be available in all contexts.destinationClass
- Class of the destination field. This may not be
available in all contexts.message
- Human-readable error textpublic Object getSourceObject()
sourceObject
is marked transient
, because
Object
is not Serializable
. If
for any reason this exception is serialized and deserialized, this method
will subsequently return null
.public Class<?> getDestinationClass()
Copyright © 2005–2023. All rights reserved.