com.github.datalking.common.convert.ConversionService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of play-mvc Show documentation
Show all versions of play-mvc Show documentation
simple mvc framework based on java servlet.
The newest version!
package com.github.datalking.common.convert;
import com.github.datalking.common.convert.descriptor.TypeDescriptor;
/**
* 数据类型转换 接口
*
* @author yaoo on 5/4/18
*/
public interface ConversionService {
// 判断是否可以将一个Java类转换为另一个Java类
boolean canConvert(Class> sourceType, Class> targetType);
// 将源类型对象转换为目标类型对象
T convert(Object source, Class targetType);
Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType);
boolean canConvert(TypeDescriptor sourceType, TypeDescriptor targetType);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy