接口 MultiValueConverter<S>

    • 方法详细资料

      • accept

        boolean accept​(java.lang.Class<S> sourceType,
                       java.lang.Class<?> multiValueType)
        Accept the source type and target type or not
        参数:
        sourceType - the source type
        multiValueType - the multi-value type
        返回:
        if accepted, return true, or false
      • convert

        java.lang.Object convert​(S source,
                                 java.lang.Class<?> multiValueType,
                                 java.lang.Class<?> elementType)
        Convert the source to be the multiple value
        参数:
        source - the source-typed value
        multiValueType - the multi-value type
        elementType - the element type
        返回:
      • getSourceType

        default java.lang.Class<S> getSourceType()
        Get the source type
        返回:
        non-null
      • find

        static MultiValueConverter<?> find​(java.lang.Class<?> sourceType,
                                           java.lang.Class<?> targetType)
        Find the MultiValueConverter instance from ServiceLoader with the specified source and target type
        参数:
        sourceType - the source type
        targetType - the target type
        返回:
        null if not found
      • convertIfPossible

        static <T> T convertIfPossible​(java.lang.Object source,
                                       java.lang.Class<?> multiValueType,
                                       java.lang.Class<?> elementType)