java.lang.String value.
Currently this is used by the PreAssignmentProcessor to possibly
modify the value of a string before time is taken to convert it.
This can be used when modifying the setter of the bean is not possible.
WARNING - using a processor can change the string in ways that could make it impossible to be processed or make it into a different format than what you are expecting based on the settings of the parser and reader. So great care must be taken when creating and using a StringProcessor.
NOTE - Because of the potential problems a bad processor can cause we will close down any bug reports created for opencsv where a StringProcessor is involved with the recommendation they be reopened as a support request.
| Modifier and Type | Method and Description |
|---|---|
| public String | Returns: The processedStringString to be processedMethod that contains the code that will transform a string into the value that will be validated and converted into the bean field. |
| public void | setParameterString(String
Information used by the processor to process the string value)This allows the validator extending |
| processString | back to summary |
|---|---|
| public String processString(String value) Method that contains the code that will transform a string into the value that will be validated and converted into the bean field. | |
| setParameterString | back to summary |
|---|---|
| public void setParameterString(String value) This allows the validator extending The data could be a default value or whatever the custom processor requires to convert the data. If the processor needs multiple parameters, then you will need to combine them into a single string using some sort of delimiter, say a comma, and parse them out using some library that allows you to parse such strings 😁. If the processor does not need a value then just create an empty method like the ConvertEmptyOrBlankStringsToNull processor used by the BeanFieldProcessorTest.
| |