Class ClassArrayConverter

  • All Implemented Interfaces:
    TypeConverter<java.lang.Class[]>

    public class ClassArrayConverter
    extends ArrayConverter<java.lang.Class>
    Converts given object to Class array. Conversion rules:
    • null value is returned as null
    • 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
    This converter supports custom syntax for defining array of classes in a String:
    • The following chars are delimiters: ,;\n.
    • Blank lines are ignored
    • Lines that starts with '#' (after trim) are ignored.
    • Constructor Detail

    • Method Detail

      • createArray

        protected java.lang.Class[] createArray​(int length)
        Description copied from class: ArrayConverter
        Creates new array of target component type. Default implementation uses reflection to create an array of target type. Override it for better performances.
        Overrides:
        createArray in class ArrayConverter<java.lang.Class>