Class StringToIterableConverter<T extends Iterable>

java.lang.Object
org.apache.dubbo.common.convert.multiple.StringToIterableConverter<T>
All Implemented Interfaces:
Comparable<Prioritized>, MultiValueConverter<String>, StringToMultiValueConverter, Prioritized
Direct Known Subclasses:
StringToBlockingDequeConverter, StringToBlockingQueueConverter, StringToCollectionConverter, StringToDequeConverter, StringToListConverter, StringToNavigableSetConverter, StringToQueueConverter, StringToSetConverter, StringToSortedSetConverter, StringToTransferQueueConverter

public abstract class StringToIterableConverter<T extends Iterable> extends Object implements StringToMultiValueConverter
The class to convert String to Iterable-based value
Since:
2.7.6
  • Constructor Details

    • StringToIterableConverter

      public StringToIterableConverter(FrameworkModel frameworkModel)
  • Method Details

    • accept

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

      public final Object convert(String[] segments, int size, Class<?> multiValueType, 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
      multiValueType - the target type
      elementType - the element type
      Returns:
      multiple value object
    • getPriority

      public final int getPriority()
      Description copied from interface: Prioritized
      Get the priority
      Specified by:
      getPriority in interface Prioritized
      Returns:
      the default is Prioritized.NORMAL_PRIORITY