FasterXML / FasterXML/java-classmate

How to build AnnotationOverrides from ObjectMapper

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

描述

Hi Tatu,

In the context of my JSON Schema Generator library, I've been asked to support the mix-ins registered on a given Jackson `ObjectMapper`, when resolving members via classmate.
I saw the usage of the `AnnotationOverrides` type in classmate expecting this method to be implemented:
```java
List> mixInsFor(ClassKey);
```
Unfortunately, the `ClassKey` is a utility type, which doesn't offer a getter for the wrapped `Class`, which complicates things.

Likewise on the Jackson `ObjectMapper`, there is no way to retrieve a full set of registered mix-ins as a simple `Map`. Just this method:
```java
Class findMixInClassFor(Class)
```

Any suggestions on how to implement the `AnnotationOverrides` based on a fully configured `ObjectMapper` without requiring the same mix-ins to be provided all over again?

贡献指南

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

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

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