AccessibleProperty.java 文件源码

java
阅读 28 收藏 0 点赞 0 评论 0

项目:warpdb 作者:
private static Class<?> getConverterType(AttributeConverter<Object, Object> converter) {
    if (converter != null) {
        List<Type> types = ClassUtils.getGenericInterfacesIncludeHierarchy(converter.getClass());
        for (Type type : types) {
            if (type instanceof ParameterizedType) {
                ParameterizedType pt = (ParameterizedType) type;
                if (pt.getRawType() == AttributeConverter.class) {
                    Type dbType = pt.getActualTypeArguments()[1];
                    if (dbType instanceof Class) {
                        return (Class<?>) dbType;
                    }
                }
            }

        }
    }
    return null;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号