接口 NacosConfigConverter<T>

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

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

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

      • canConvert

        boolean canConvert​(java.lang.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​(java.lang.String config)
        Convert the Nacos' config of type S to target type T.
        参数:
        config - the Nacos'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)