Example usage for com.fasterxml.jackson.databind DeserializationConfig getAnnotationIntrospector

List of usage examples for com.fasterxml.jackson.databind DeserializationConfig getAnnotationIntrospector

Introduction

In this page you can find the example usage for com.fasterxml.jackson.databind DeserializationConfig getAnnotationIntrospector.

Prototype

public AnnotationIntrospector getAnnotationIntrospector() 

Source Link

Usage

From source file:com.addthis.codec.jackson.CodecBeanDeserializerModifier.java

@Override
public JsonDeserializer<?> modifyEnumDeserializer(DeserializationConfig config, JavaType type,
        BeanDescription beanDesc, JsonDeserializer<?> deserializer) {
    JsonDeserializer<?> delegatee = deserializer.getDelegatee();
    if (delegatee != null) {
        JsonDeserializer<?> replacementDelegatee = modifyEnumDeserializer(config, type, beanDesc, delegatee);
        return deserializer.replaceDelegatee(replacementDelegatee);
    } else if (modifyEnum && deserializer.getClass().equals(EnumDeserializer.class)) {
        EnumResolver enumResolver = EnumResolver.constructUnsafe(type.getRawClass(),
                config.getAnnotationIntrospector());
        return new CaseIgnoringEnumDeserializer(enumResolver);
    } else {//from w  ww .j a va2 s.  c o  m
        return deserializer;
    }
}