Class BeanPropertyIntrospector

java.lang.Object
com.fasterxml.jackson.jr.ob.impl.BeanPropertyIntrospector

public class BeanPropertyIntrospector extends Object
Helper class that jackson-jr uses by default to introspect POJO properties (represented as POJODefinition) to build general POJO readers (deserializers) and writers (serializers).

Note that most of the usage is via ValueReaderLocator and ValueWriterLocator

Since:
2.11
  • Field Details

  • Constructor Details

    • BeanPropertyIntrospector

      public BeanPropertyIntrospector()
  • Method Details

    • instance

      public static BeanPropertyIntrospector instance()
    • pojoDefinitionForDeserialization

      public POJODefinition pojoDefinitionForDeserialization(JSONReader r, Class<?> pojoType)
    • pojoDefinitionForSerialization

      public POJODefinition pojoDefinitionForSerialization(JSONWriter w, Class<?> pojoType)
    • derivePropertiesFromRecordConstructor

      public static <P> Constructor<?> derivePropertiesFromRecordConstructor(Class<?> beanType, Map<String,P> propsByName, Function<String,P> propBuilder)
      Gets canonical constructor of given types and adds properties to the map, derived from constructor parameters.
    • addNonRecordConstructors

      public static void addNonRecordConstructors(Class<?> beanType, BeanConstructors constructors)
      Adds all beanType's 0 and 1 argument declared constructors to constructors.
    • isGroovyMetaClass

      protected static boolean isGroovyMetaClass(Class<?> clazz)
      Helper method to detect Groovy's problematic metadata accessor type.

      NOTE: Groovy MetaClass have cyclic reference, and hence the class containing it should not be serialized without either removing that reference, or skipping over such references.