public abstract class AbstractModelConverter extends Object implements ModelConverter
Modifier and Type | Field and Description |
---|---|
protected com.fasterxml.jackson.databind.AnnotationIntrospector |
_intr |
protected com.fasterxml.jackson.databind.ObjectMapper |
_mapper |
protected Map<com.fasterxml.jackson.databind.JavaType,String> |
_resolvedTypeNames
Minor optimization: no need to keep on resolving same types over and over
again.
|
protected TypeNameResolver |
_typeNameResolver |
Modifier | Constructor and Description |
---|---|
protected |
AbstractModelConverter(com.fasterxml.jackson.databind.ObjectMapper mapper) |
protected |
AbstractModelConverter(com.fasterxml.jackson.databind.ObjectMapper mapper,
TypeNameResolver typeNameResolver) |
Modifier and Type | Method and Description |
---|---|
protected String |
_description(com.fasterxml.jackson.databind.introspect.Annotated ann) |
protected String |
_findDefaultValue(com.fasterxml.jackson.databind.introspect.Annotated a) |
protected String |
_findExampleValue(com.fasterxml.jackson.databind.introspect.Annotated a) |
protected Boolean |
_findReadOnly(com.fasterxml.jackson.databind.introspect.Annotated a) |
protected Boolean |
_findReadOnlyFromAccessMode(com.fasterxml.jackson.databind.introspect.Annotated a) |
protected String |
_findTypeName(com.fasterxml.jackson.databind.JavaType type,
com.fasterxml.jackson.databind.BeanDescription beanDesc) |
protected boolean |
_isSetType(Class<?> cls) |
protected String |
_subTypeName(com.fasterxml.jackson.databind.jsontype.NamedType type) |
protected String |
_typeName(com.fasterxml.jackson.databind.JavaType type) |
protected String |
_typeName(com.fasterxml.jackson.databind.JavaType type,
com.fasterxml.jackson.databind.BeanDescription beanDesc) |
protected String |
_typeQName(com.fasterxml.jackson.databind.JavaType type) |
protected static Comparator<Property> |
getPropertyComparator() |
protected boolean |
prioritizeAnnotationInspectorSchemaName()
whether to resolve schema name by first using AnnotationInspector registered implementations
defaults to false, override returning `true` to obtain pre-1.5.24 behaviour
|
Model |
resolve(Type type,
ModelConverterContext context,
Iterator<ModelConverter> chain) |
Property |
resolveProperty(Type type,
ModelConverterContext context,
Annotation[] annotations,
Iterator<ModelConverter> chain) |
protected final com.fasterxml.jackson.databind.ObjectMapper _mapper
protected final com.fasterxml.jackson.databind.AnnotationIntrospector _intr
protected final TypeNameResolver _typeNameResolver
protected AbstractModelConverter(com.fasterxml.jackson.databind.ObjectMapper mapper)
protected AbstractModelConverter(com.fasterxml.jackson.databind.ObjectMapper mapper, TypeNameResolver typeNameResolver)
protected static Comparator<Property> getPropertyComparator()
public Property resolveProperty(Type type, ModelConverterContext context, Annotation[] annotations, Iterator<ModelConverter> chain)
resolveProperty
in interface ModelConverter
annotations
- to consider when resolving the propertychain
- the chain of model converters to try if this implementation cannot processprotected String _description(com.fasterxml.jackson.databind.introspect.Annotated ann)
protected String _typeName(com.fasterxml.jackson.databind.JavaType type)
protected String _typeName(com.fasterxml.jackson.databind.JavaType type, com.fasterxml.jackson.databind.BeanDescription beanDesc)
protected boolean prioritizeAnnotationInspectorSchemaName()
protected String _findTypeName(com.fasterxml.jackson.databind.JavaType type, com.fasterxml.jackson.databind.BeanDescription beanDesc)
protected String _typeQName(com.fasterxml.jackson.databind.JavaType type)
protected String _subTypeName(com.fasterxml.jackson.databind.jsontype.NamedType type)
protected String _findDefaultValue(com.fasterxml.jackson.databind.introspect.Annotated a)
protected String _findExampleValue(com.fasterxml.jackson.databind.introspect.Annotated a)
protected Boolean _findReadOnly(com.fasterxml.jackson.databind.introspect.Annotated a)
protected Boolean _findReadOnlyFromAccessMode(com.fasterxml.jackson.databind.introspect.Annotated a)
protected boolean _isSetType(Class<?> cls)
public Model resolve(Type type, ModelConverterContext context, Iterator<ModelConverter> chain)
resolve
in interface ModelConverter
chain
- the chain of model converters to try if this implementation cannot processCopyright © 2019. All Rights Reserved.