FasterXML / FasterXML/java-classmate

Convert GenericType or ResolvedType to JavaType

未关闭
#69 22 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Java
星标
266
派生
47
平均合并
1 小时 42 分钟
30 天内合并 PR
1

描述

Some function like `Jackson2JsonRedisSerializer` requires `JavaType` as parameter. When I tried to pass generic type parameter via `GenericType` object, I find that `GenericType` can only be converted to `ResolvedType`, and there is no way from ResolvedType to JavaType.

```java
TypeResolver resolver = new TypeResolver();
GenericType gtype = new GenericType(){}
ResolvedType rtype = resolver.resolve(gtype);
// seems correct but constructType will throw when receiving GenericType!
JavaType javatype= TypeFactory.defaultInstance().constructType(rtype);
```

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。