接口 NacosConfigConverter<T>

类型参数:
T - the target type that wanted

public interface NacosConfigConverter<T>
Nacos Config Converter.
从以下版本开始:
0.2.0
作者:
Mercy
  • 方法概要

    修饰符和类型
    方法
    说明
    boolean
    canConvert​(Class<T> targetType)
    can convert to be target type or not.
    convert​(String config)
    Convert the Nacos' config of type S to target type T.
  • 方法详细资料

    • canConvert

      boolean canConvert(Class<T> targetType)
      can convert to be target type or not.
      参数:
      targetType - the type of target
      返回:
      If can , return true, or false
    • convert

      T convert(String config)
      Convert the Nacos' config of type S to target type T.
      参数:
      config - the Naocs's config to convert, which must be an instance of S (never null)
      返回:
      the converted object, which must be an instance of T (potentially null)