Package co.elastic.clients.json
Class JsonpDeserializerBase<V>
java.lang.Object
co.elastic.clients.json.JsonpDeserializerBase<V>
- All Implemented Interfaces:
JsonpDeserializer<V>
- Direct Known Subclasses:
ExternallyTaggedUnion.TypedKeysDeserializer
,JsonEnums.Deserializer
Base class for
JsonpDeserializer
implementations that accept a set of JSON events known at instanciation time.-
Constructor Summary
ModifierConstructorDescriptionprotected
JsonpDeserializerBase
(EnumSet<jakarta.json.stream.JsonParser.Event> acceptedEvents) protected
JsonpDeserializerBase
(EnumSet<jakarta.json.stream.JsonParser.Event> acceptedEvents, EnumSet<jakarta.json.stream.JsonParser.Event> nativeEvents) -
Method Summary
Modifier and TypeMethodDescriptionfinal EnumSet<jakarta.json.stream.JsonParser.Event>
The JSON events this deserializer accepts as a starting pointfinal boolean
accepts
(jakarta.json.stream.JsonParser.Event event) Convenience method foracceptedEvents.contains(event)
protected static EnumSet<jakarta.json.stream.JsonParser.Event>
allAcceptedEvents
(JsonpDeserializer<?>... deserializers) Combines accepted events from a number of deserializersEnumSet<jakarta.json.stream.JsonParser.Event>
The native JSON events this deserializer accepts as a starting point.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
deserialize, deserialize
-
Constructor Details
-
JsonpDeserializerBase
-
JsonpDeserializerBase
-
-
Method Details
-
allAcceptedEvents
protected static EnumSet<jakarta.json.stream.JsonParser.Event> allAcceptedEvents(JsonpDeserializer<?>... deserializers) Combines accepted events from a number of deserializers -
nativeEvents
Description copied from interface:JsonpDeserializer
The native JSON events this deserializer accepts as a starting point. For example, native events for a boolean areJsonParser.Event.VALUE_TRUE
andJsonParser.Event.VALUE_FALSE
.- Specified by:
nativeEvents
in interfaceJsonpDeserializer<V>
-
acceptedEvents
The JSON events this deserializer accepts as a starting point- Specified by:
acceptedEvents
in interfaceJsonpDeserializer<V>
-
accepts
public final boolean accepts(jakarta.json.stream.JsonParser.Event event) Convenience method foracceptedEvents.contains(event)
- Specified by:
accepts
in interfaceJsonpDeserializer<V>
-