public class JsonSubTypesResolver extends Object implements SubtypeResolver, CustomDefinitionProviderV2
JsonSubTypes annotation.| Constructor and Description |
|---|
JsonSubTypesResolver() |
| Modifier and Type | Method and Description |
|---|---|
List<com.fasterxml.classmate.ResolvedType> |
findSubtypes(com.fasterxml.classmate.ResolvedType declaredType,
SchemaGenerationContext context) |
List<com.fasterxml.classmate.ResolvedType> |
findTargetTypeOverrides(MemberScope<?,?> property)
Look-up applicable subtypes for the given field/method if there is a
JsonSubTypes annotation. |
List<com.fasterxml.classmate.ResolvedType> |
lookUpSubtypesFromAnnotation(com.fasterxml.classmate.ResolvedType declaredType,
com.fasterxml.jackson.annotation.JsonSubTypes subtypesAnnotation,
TypeContext context)
Mapping the declared erased types from the annotation to resolved types.
|
CustomPropertyDefinition |
provideCustomPropertySchemaDefinition(MemberScope<?,?> scope,
SchemaGenerationContext context)
Providing custom schema definition for field/method in case of a per-property override of the applicable subtypes or how they are serialized.
|
CustomDefinition |
provideCustomSchemaDefinition(com.fasterxml.classmate.ResolvedType javaType,
SchemaGenerationContext context) |
public List<com.fasterxml.classmate.ResolvedType> findSubtypes(com.fasterxml.classmate.ResolvedType declaredType, SchemaGenerationContext context)
findSubtypes in interface SubtypeResolverpublic List<com.fasterxml.classmate.ResolvedType> findTargetTypeOverrides(MemberScope<?,?> property)
JsonSubTypes annotation.property - targeted field/methodnull if there is no JsonSubTypes annotation)public List<com.fasterxml.classmate.ResolvedType> lookUpSubtypesFromAnnotation(com.fasterxml.classmate.ResolvedType declaredType, com.fasterxml.jackson.annotation.JsonSubTypes subtypesAnnotation, TypeContext context)
null if annotation is null/not present.declaredType - supertype encountered while generating a schemasubtypesAnnotation - annotation to derive applicable subtypes from.context - type context for proper type resolutionnull if given annotation is null)public CustomDefinition provideCustomSchemaDefinition(com.fasterxml.classmate.ResolvedType javaType, SchemaGenerationContext context)
provideCustomSchemaDefinition in interface CustomDefinitionProviderV2public CustomPropertyDefinition provideCustomPropertySchemaDefinition(MemberScope<?,?> scope, SchemaGenerationContext context)
scope - targeted field or methodcontext - generation contextnull)Copyright © 2021 VicTools. All rights reserved.