Class ClassArrayConverter
- All Implemented Interfaces:
TypeConverter<Class[]>
Converts given object to
Class array.
Conversion rules:
nullvalue is returned asnull- object of destination type is simply casted
- single Class is wrapped in 1-length array
- string value is converted to string array (from CSV format) and then each element is converted
- The following chars are delimiters:
,;\n. - Blank lines are ignored
- Lines that starts with '#' (after trim) are ignored.
-
Field Summary
Fields inherited from class ArrayConverter
NUMBER_DELIMITERS, targetComponentType, typeConverterManager -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String[]convertStringToArray(String value) Converts string to array, for theArrayConverter.convertValueToArray(Object)method.protected Class[]createArray(int length) Creates new array of target component type.Methods inherited from class ArrayConverter
convert, convertArrayToArray, convertPrimitiveArrayToArray, convertToSingleElementArray, convertType, convertValueToArrayMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface TypeConverter
convert
-
Constructor Details
-
ClassArrayConverter
-
-
Method Details
-
createArray
Description copied from class:ArrayConverterCreates new array of target component type. Default implementation uses reflection to create an array of target type. Override it for better performances.- Overrides:
createArrayin classArrayConverter<Class>
-
convertStringToArray
Description copied from class:ArrayConverterConverts string to array, for theArrayConverter.convertValueToArray(Object)method. By default, the string is converted into an array usingCsvUtil.- Overrides:
convertStringToArrayin classArrayConverter<Class>
-