Interface NacosConfigConverter<T>

  • Type Parameters:
    T - the target type that wanted

    public interface NacosConfigConverter<T>
    Nacos Config Converter
    Since:
    0.2.0
    Author:
    Mercy
    • Method Detail

      • canConvert

        boolean canConvert​(Class<T> targetType)
        can convert to be target type or not
        Parameters:
        targetType - the type of target
        Returns:
        If can , return true, or false
      • convert

        T convert​(String config)
        convert the Naocs's config of type S to target type T.
        Parameters:
        config - the Naocs's config to convert, which must be an instance of S (never null)
        Returns:
        the converted object, which must be an instance of T (potentially null)