top.jfunc.common.string.FromStringHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of utils Show documentation
Show all versions of utils Show documentation
common utils like IOUtil,StrUtil,HoldProcessor.etc.
package top.jfunc.common.string;
/**
* 类泛型,可以针对某个类特殊处理
* @see FromString
* @author xiongshiyan at 2019/5/6 , contact me with email [email protected] or phone 15208384257
*/
@FunctionalInterface
public interface FromStringHandler {
/**
* 可能是基于Json、XML或者自定义的将String转换为Java对象
* @param src 字符串
* @param toClass 转换成的class
* @return T
*/
T as(String src, Class toClass);
}