public class CsvRequiredFieldEmptyException extends CsvFieldAssignmentException
Constructor and Description |
---|
CsvRequiredFieldEmptyException()
Default constructor, in case no further information is necessary.
|
CsvRequiredFieldEmptyException(Class<?> beanClass,
Field destinationField)
Constructor for setting the intended class and field of the target bean.
|
CsvRequiredFieldEmptyException(Class<?> beanClass,
Field destinationField,
String message)
Constructor for setting the intended class and field of the target bean
along with an error message.
|
CsvRequiredFieldEmptyException(Class<?> beanClass,
List<Field> destinationFields)
Constructor for setting the intended class and fields of the target bean.
|
CsvRequiredFieldEmptyException(Class<?> beanClass,
List<Field> destinationFields,
String message)
Constructor for setting the intended class and fields of the target bean
along with an error message.
|
CsvRequiredFieldEmptyException(Class<?> beanClass,
String message)
Constructor for setting the intended class of the target bean and a
human-readable error message.
|
CsvRequiredFieldEmptyException(String message)
Constructor with a simple text.
|
Modifier and Type | Method and Description |
---|---|
Class<?> |
getBeanClass()
Gets the class of the bean to which the value was to be assigned.
|
Field |
getDestinationField()
Gets the field from the Reflection API that was to be assigned.
|
List<Field> |
getDestinationFields()
Returns the complete list of all fields that were to be empty.
|
getLine, getLineNumber, setLine, setLineNumber
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public CsvRequiredFieldEmptyException()
public CsvRequiredFieldEmptyException(String message)
message
- Human-readable error textpublic CsvRequiredFieldEmptyException(Class<?> beanClass, Field destinationField)
These may not be known in every context.
This constructor is provided for backward compatibility and for convenience if you only have one missing destination field.
beanClass
- Class of the destination beandestinationField
- Field of the destination field in the destination beanpublic CsvRequiredFieldEmptyException(Class<?> beanClass, List<Field> destinationFields)
beanClass
- Class of the destination beandestinationFields
- Fields of the destination fields in the destination beanpublic CsvRequiredFieldEmptyException(Class<?> beanClass, String message)
beanClass
- Class of the destination beanmessage
- Human-readable error textpublic CsvRequiredFieldEmptyException(Class<?> beanClass, Field destinationField, String message)
The class and field may not be known in every context.
This constructor is provided for backward compatibility and for convenience if you only have one missing destination field.
beanClass
- Class of the destination beandestinationField
- Field of the destination field in the destination beanmessage
- Human-readable error textpublic CsvRequiredFieldEmptyException(Class<?> beanClass, List<Field> destinationFields, String message)
beanClass
- Class of the destination beandestinationFields
- Field of the destination field in the destination beanmessage
- Human-readable error textpublic Class<?> getBeanClass()
public Field getDestinationField()
This method is provided as a convenience for when you know there can be only one field, or you really only care about the first field.
destinationFields
is marked transient
, because
Field
is not Serializable
. If
for any reason this exception is serialized and deserialized, this method
will subsequently return null
.
public List<Field> getDestinationFields()
destinationFields
is marked transient
, because
Field
is not Serializable
. If
for any reason this exception is serialized and deserialized, this method
will subsequently return null
.Copyright © 2005–2023. All rights reserved.