All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.featherfly.conversion.string.ToStringConvertor Maven / Gradle / Ivy

There is a newer version: 1.5.0
Show newest version
package cn.featherfly.conversion.string;

import cn.featherfly.common.lang.GenericType;
import cn.featherfly.conversion.Convertor;
import cn.featherfly.conversion.TypePolicys;

/**
 * 

* 转换器 *

* * @param 类型 * @author 钟冀 */ public interface ToStringConvertor extends Convertor { /** * {@inheritDoc} */ @Override default Class getTargetType() { return String.class; } TypePolicys getPolicy(); /** *

* 对象转换为字符串 *

* * @param value 对象 * @param genericType 指定对象的上下文属性 * @param GenericType子类泛型 * @return 字符串 */ @Override > String sourceToTarget(S value, GT genericType); /** *

* 字符串转换为对象 *

* * @param value 字符串 * @param genericType 指定对象的上下文属性 * @param GenericType子类泛型 * @return 对象 */ @Override > S targetToSource(String value, GT genericType); }