com.fasterxml.jackson.databind.introspect

## Class ClassIntrospector

- java.lang.Object
- - com.fasterxml.jackson.databind.introspect.ClassIntrospector

- Direct Known Subclasses:
    BasicClassIntrospector

      public abstract class ClassIntrospector
      extends Object

  Helper class used to introspect features of POJO value classes used with Jackson. The main use is for finding out POJO construction (creator) and value access (getters, setters) methods and annotations that define configuration of using those methods.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static interface` | `ClassIntrospector.MixInResolver` Interface used for decoupling details of how mix-in annotation definitions are accessed (via this interface), and how they are stored (defined by classes that implement the interface)

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `ClassIntrospector()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract ClassIntrospector` | `copy()` Method that may be needed when `copy()`ing `ObjectMapper` instances.
    `abstract BeanDescription` | `forClassAnnotations(MapperConfig<?> cfg, JavaType type, ClassIntrospector.MixInResolver r)` Factory method that constructs an introspector that only has information regarding annotations class itself (or its supertypes) has, but nothing on methods or constructors.
    `abstract BeanDescription` | `forCreation(DeserializationConfig cfg, JavaType type, ClassIntrospector.MixInResolver r)` Factory method that constructs an introspector that has information necessary for creating instances of given class ("creator"), as well as class annotations, but no information on member methods
    `abstract BeanDescription` | `forDeserialization(DeserializationConfig cfg, JavaType type, ClassIntrospector.MixInResolver r)` Factory method that constructs an introspector that has all information needed for deserialization purposes.
    `abstract BeanDescription` | `forDeserializationWithBuilder(DeserializationConfig cfg, JavaType builderType, ClassIntrospector.MixInResolver r)` Deprecated. Since 2.12 use overload that take value type description
    `abstract BeanDescription` | `forDeserializationWithBuilder(DeserializationConfig cfg, JavaType builderType, ClassIntrospector.MixInResolver r, BeanDescription valueTypeDesc)` Factory method that constructs an introspector that has all information needed for constructing deserializers that use intermediate Builder objects.
    `abstract BeanDescription` | `forDirectClassAnnotations(MapperConfig<?> cfg, JavaType type, ClassIntrospector.MixInResolver r)` Factory method that constructs an introspector that only has information regarding annotations class itself has (but NOT including its supertypes), but nothing on methods or constructors.
    `abstract BeanDescription` | `forSerialization(SerializationConfig cfg, JavaType type, ClassIntrospector.MixInResolver r)` Factory method that constructs an introspector that has all information needed for serialization purposes.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ClassIntrospector

          protected ClassIntrospector()

  - ### Method Detail

    - #### copy

          public abstract ClassIntrospector copy()

      Method that may be needed when `copy()`ing `ObjectMapper` instances.
      Since:
        2.9.6

    - #### forSerialization

          public abstract BeanDescription forSerialization(SerializationConfig cfg,
                                                           JavaType type,
                                                           ClassIntrospector.MixInResolver r)

      Factory method that constructs an introspector that has all information needed for serialization purposes.

    - #### forDeserialization

          public abstract BeanDescription forDeserialization(DeserializationConfig cfg,
                                                             JavaType type,
                                                             ClassIntrospector.MixInResolver r)

      Factory method that constructs an introspector that has all information needed for deserialization purposes.

    - #### forDeserializationWithBuilder

          public abstract BeanDescription forDeserializationWithBuilder(DeserializationConfig cfg,
                                                                        JavaType builderType,
                                                                        ClassIntrospector.MixInResolver r,
                                                                        BeanDescription valueTypeDesc)

      Factory method that constructs an introspector that has all information needed for constructing deserializers that use intermediate Builder objects.
      Since:
        2.12

    - #### forDeserializationWithBuilder

          @Deprecated
          public abstract BeanDescription forDeserializationWithBuilder(DeserializationConfig cfg,
                                                                                    JavaType builderType,
                                                                                    ClassIntrospector.MixInResolver r)

      Deprecated. Since 2.12 use overload that take value type description

    - #### forCreation

          public abstract BeanDescription forCreation(DeserializationConfig cfg,
                                                      JavaType type,
                                                      ClassIntrospector.MixInResolver r)

      Factory method that constructs an introspector that has information necessary for creating instances of given class ("creator"), as well as class annotations, but no information on member methods

    - #### forClassAnnotations

          public abstract BeanDescription forClassAnnotations(MapperConfig<?> cfg,
                                                              JavaType type,
                                                              ClassIntrospector.MixInResolver r)

      Factory method that constructs an introspector that only has information regarding annotations class itself (or its supertypes) has, but nothing on methods or constructors.

    - #### forDirectClassAnnotations

          public abstract BeanDescription forDirectClassAnnotations(MapperConfig<?> cfg,
                                                                    JavaType type,
                                                                    ClassIntrospector.MixInResolver r)

      Factory method that constructs an introspector that only has information regarding annotations class itself has (but NOT including its supertypes), but nothing on methods or constructors.

Copyright © 2008–2020 FasterXML. All rights reserved.