Class StringToArrayConverter

    • Constructor Detail

      • StringToArrayConverter

        public StringToArrayConverter()
    • Method Detail

      • accept

        public boolean accept​(java.lang.Class<java.lang.String> type,
                              java.lang.Class<?> multiValueType)
        Description copied from interface: MultiValueConverter
        Accept the source type and target type or not
        Specified by:
        accept in interface MultiValueConverter<java.lang.String>
        Parameters:
        type - the source type
        multiValueType - the multi-value type
        Returns:
        if accepted, return true, or false
      • convert

        public java.lang.Object convert​(java.lang.String[] segments,
                                        int size,
                                        java.lang.Class<?> targetType,
                                        java.lang.Class<?> elementType)
        Description copied from interface: StringToMultiValueConverter
        Convert the segments to multiple value object
        Specified by:
        convert in interface StringToMultiValueConverter
        Parameters:
        segments - the String array of content
        size - the size of multiple value object
        targetType - the target type
        elementType - the element type
        Returns:
        multiple value object