cn.featherfly.conversion.string.basic.StringBuilderConvertor Maven / Gradle / Ivy
package cn.featherfly.conversion.string.basic;
import cn.featherfly.common.lang.GenericType;
/**
*
* StringBuilder类转换器
*
*
* @author 钟冀
*/
public class StringBuilderConvertor extends AbstractBasicConvertor> {
/**
*/
public StringBuilderConvertor() {
}
/**
* {@inheritDoc}
*/
@Override
protected String doToString(StringBuilder value, GenericType genericType) {
if (value != null) {
return value.toString();
}
return "";
}
/**
* {@inheritDoc}
*/
@Override
protected StringBuilder doToObject(String value, GenericType genericType) {
if (value != null) {
return new StringBuilder(value);
}
return null;
}
}