I have a system that involves dynamic @JsonSubTypes contributors and I'm trying to figure out how to refactor my code (example below) to not use the @JsonSubTypes annotation but instead provide these values dynamically or in runtime. Does anyone know if this is possible?
@JsonSubTypes({
@JsonSubTypes.Type(value = Dog.class, name = "dog"),
@JsonSubTypes.Type(value = Cat.class, name = "cat")
})