com.fasterxml.jackson.databind.ext

## Class OptionalHandlerFactory

- java.lang.Object
- - com.fasterxml.jackson.databind.ext.OptionalHandlerFactory

- All Implemented Interfaces:
    java.io.Serializable

      public class OptionalHandlerFactory
      extends java.lang.Object
      implements java.io.Serializable

  Helper class used for isolating details of handling optional+external types (javax.xml classes) from standard factories that offer them.

  Note that 2.7 changed handling to slightly less dynamic, to avoid having to traverse class hierarchy, which turned to be a performance issue in certain cases. Since DOM classes are assumed to exist on all Java 1.6 environments (yes, even on Android/GAE), this part could be simplified by slightly less dynamic lookups.

  Also with 2.7 we are supporting JDK 1.7/Java 7 type(s).

  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static OptionalHandlerFactory` | `instance`

  - ### Constructor Summary

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

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `JsonDeserializer<?>` | `findDeserializer(JavaType type, DeserializationConfig config, BeanDescription beanDesc)`
    `JsonSerializer<?>` | `findSerializer(SerializationConfig config, JavaType type, BeanDescription beanDesc)`

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

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

- - ### Field Detail

    - #### instance

          public static final OptionalHandlerFactory instance

  - ### Constructor Detail

    - #### OptionalHandlerFactory

          protected OptionalHandlerFactory()

  - ### Method Detail

    - #### findSerializer

          public JsonSerializer<?> findSerializer(SerializationConfig config,
                                         JavaType type,
                                         BeanDescription beanDesc)

    - #### findDeserializer

          public JsonDeserializer<?> findDeserializer(JavaType type,
                                             DeserializationConfig config,
                                             BeanDescription beanDesc)
                                               throws JsonMappingException

      Throws:
        `JsonMappingException`