Class DelegatingDeserializer<T,​U>

java.lang.Object
co.elastic.clients.json.DelegatingDeserializer<T,​U>
All Implemented Interfaces:
JsonpDeserializer<T>
Direct Known Subclasses:
BuildFunctionDeserializer, DelegatingDeserializer.SameType, ObjectBuilderDeserializer

public abstract class DelegatingDeserializer<T,​U>
extends java.lang.Object
implements JsonpDeserializer<T>
  • Nested Class Summary

    Nested Classes
    Modifier and Type Class Description
    static class  DelegatingDeserializer.SameType<T>  
  • Constructor Summary

    Constructors
    Constructor Description
    DelegatingDeserializer()  
  • Method Summary

    Modifier and Type Method Description
    java.util.EnumSet<jakarta.json.stream.JsonParser.Event> acceptedEvents()
    The JSON events this deserializer accepts as a starting point.
    java.util.EnumSet<jakarta.json.stream.JsonParser.Event> nativeEvents()
    The native JSON events this deserializer accepts as a starting point.
    protected abstract JsonpDeserializer<U> unwrap()  
    static JsonpDeserializer<?> unwrap​(JsonpDeserializer<?> deserializer)
    Unwraps a deserializer.

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface co.elastic.clients.json.JsonpDeserializer

    accepts, deserialize, deserialize
  • Constructor Details

    • DelegatingDeserializer

      public DelegatingDeserializer()
  • Method Details

    • unwrap

      protected abstract JsonpDeserializer<U> unwrap()
    • nativeEvents

      public java.util.EnumSet<jakarta.json.stream.JsonParser.Event> nativeEvents()
      Description copied from interface: JsonpDeserializer
      The native JSON events this deserializer accepts as a starting point. For example, native events for a boolean are JsonParser.Event.VALUE_TRUE and JsonParser.Event.VALUE_FALSE.
      Specified by:
      nativeEvents in interface JsonpDeserializer<T>
    • acceptedEvents

      public java.util.EnumSet<jakarta.json.stream.JsonParser.Event> acceptedEvents()
      Description copied from interface: JsonpDeserializer
      The JSON events this deserializer accepts as a starting point. For example, events for a boolean are JsonParser.Event.VALUE_TRUE, JsonParser.Event.VALUE_FALSE and JsonParser.Event.VALUE_STRING, the latter being converted to a boolean using Boolean.parseBoolean(String).
      Specified by:
      acceptedEvents in interface JsonpDeserializer<T>
    • unwrap

      public static JsonpDeserializer<?> unwrap​(JsonpDeserializer<?> deserializer)
      Unwraps a deserializer. The object type of the result may be different from that of deserializer and unwrapping can happen several times, until the result is no more a DelegatingDeserializer.