Class GuiceAnnotationIntrospector

java.lang.Object
com.fasterxml.jackson.databind.AnnotationIntrospector
com.fasterxml.jackson.databind.introspect.NopAnnotationIntrospector
org.apache.druid.guice.GuiceAnnotationIntrospector
All Implemented Interfaces:
com.fasterxml.jackson.core.Versioned, Serializable

public class GuiceAnnotationIntrospector extends com.fasterxml.jackson.databind.introspect.NopAnnotationIntrospector
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.AnnotationIntrospector

    com.fasterxml.jackson.databind.AnnotationIntrospector.ReferenceProperty, com.fasterxml.jackson.databind.AnnotationIntrospector.XmlExtensions
  • Field Summary

    Fields inherited from class com.fasterxml.jackson.databind.introspect.NopAnnotationIntrospector

    instance
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.fasterxml.jackson.annotation.JacksonInject.Value
    findInjectableValue(com.fasterxml.jackson.databind.introspect.AnnotatedMember m)
     
    com.fasterxml.jackson.annotation.JsonIgnoreProperties.Value
    findPropertyIgnorals(com.fasterxml.jackson.databind.introspect.Annotated ac)
    This method is used to find what property to ignore in deserialization.

    Methods inherited from class com.fasterxml.jackson.databind.introspect.NopAnnotationIntrospector

    version

    Methods inherited from class com.fasterxml.jackson.databind.AnnotationIntrospector

    _findAnnotation, _hasAnnotation, _hasOneOf, allIntrospectors, allIntrospectors, findAndAddVirtualProperties, findAutoDetectVisibility, findClassDescription, findContentDeserializer, findContentSerializer, findCreatorAnnotation, findCreatorBinding, findDefaultCreator, findDefaultEnumValue, findDefaultEnumValue, findDeserializationContentConverter, findDeserializationConverter, findDeserializer, findEnumAliases, findEnumAliases, findEnumNamingStrategy, findEnumValue, findEnumValues, findEnumValues, findFilterId, findFormat, findImplicitPropertyName, findInjectableValueId, findKeyDeserializer, findKeySerializer, findMergeInfo, findNameForDeserialization, findNameForSerialization, findNamingStrategy, findNullSerializer, findObjectIdInfo, findObjectReferenceInfo, findPOJOBuilder, findPOJOBuilderConfig, findPolymorphicTypeInfo, findPropertyAccess, findPropertyAliases, findPropertyContentTypeResolver, findPropertyDefaultValue, findPropertyDescription, findPropertyIgnoralByName, findPropertyInclusion, findPropertyInclusionByName, findPropertyIndex, findPropertyTypeResolver, findReferenceType, findRenameByField, findRootName, findSerializationContentConverter, findSerializationConverter, findSerializationPropertyOrder, findSerializationSortAlphabetically, findSerializationTyping, findSerializer, findSetterInfo, findSubtypes, findTypeName, findTypeResolver, findUnwrappingNameTransformer, findValueInstantiator, findViews, findWrapperName, hasAnyGetter, hasAnyGetterAnnotation, hasAnySetter, hasAnySetterAnnotation, hasAsKey, hasAsValue, hasAsValueAnnotation, hasCreatorAnnotation, hasIgnoreMarker, hasRequiredMarker, isAnnotationBundle, isIgnorableType, isTypeId, nopInstance, pair, refineDeserializationType, refineSerializationType, resolveSetterConflict

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GuiceAnnotationIntrospector

      public GuiceAnnotationIntrospector()
  • Method Details

    • findInjectableValue

      public com.fasterxml.jackson.annotation.JacksonInject.Value findInjectableValue(com.fasterxml.jackson.databind.introspect.AnnotatedMember m)
      Overrides:
      findInjectableValue in class com.fasterxml.jackson.databind.AnnotationIntrospector
    • findPropertyIgnorals

      public com.fasterxml.jackson.annotation.JsonIgnoreProperties.Value findPropertyIgnorals(com.fasterxml.jackson.databind.introspect.Annotated ac)
      This method is used to find what property to ignore in deserialization. Jackson calls this method per every class and every constructor parameter. This implementation returns a JsonIgnoreProperties.Value.empty() that allows empty names if the parameters has the JsonProperty annotation. Otherwise, it returns JsonIgnoreProperties.Value.forIgnoredProperties("") that does NOT allow empty names. This behavior is to work around a bug in Jackson deserializer (see the below comment for details) and can be removed in the future after the bug is fixed. For example, suppose a constructor like below:
      
       @JsonCreator
       public ClassWithJacksonInject(
         @JsonProperty("val") String val,
         @JacksonInject InjectedParameter injected
       )
       
      During deserializing a JSON string into this class, this method will be called at least twice, one for val and another for injected. It will return Value.empty() for val, while {Value.forIgnoredProperties("")} for injected because the later does not have JsonProperty. As a result, injected will be ignored during deserialization since it has no name.
      Overrides:
      findPropertyIgnorals in class com.fasterxml.jackson.databind.AnnotationIntrospector