接口 Converter<S,​T>

    • 方法详细资料

      • accept

        default boolean accept​(Class<?> sourceType,
                               Class<?> targetType)
        Accept the source type and target type or not
        参数:
        sourceType - the source type
        targetType - the target type
        返回:
        if accepted, return true, or false
      • convert

        T convert​(S source)
        Convert the source-typed value to the target-typed value
        参数:
        source - the source-typed value
        返回:
        the target-typed value
      • getSourceType

        default Class<S> getSourceType()
        Get the source type
        返回:
        non-null
      • getTargetType

        default Class<T> getTargetType()
        Get the target type
        返回:
        non-null