Class CommonValueDeserializers

java.lang.Object
cz.cvut.kbss.jsonld.deserialization.CommonValueDeserializers
All Implemented Interfaces:
Configurable, ValueDeserializers

public class CommonValueDeserializers extends Object implements ValueDeserializers
Manages deserializers for one deserialization process.
  • Constructor Details

    • CommonValueDeserializers

      public CommonValueDeserializers()
  • Method Details

    • hasCustomDeserializer

      public <T> boolean hasCustomDeserializer(Class<T> type)
      Description copied from interface: ValueDeserializers
      Checks whether a custom deserializer is registered for the specified type.
      Specified by:
      hasCustomDeserializer in interface ValueDeserializers
      Type Parameters:
      T - Type of value
      Parameters:
      type - Type to check for custom deserializer for
      Returns:
      Whether a custom deserializer exists
    • getDeserializer

      public <T> Optional<ValueDeserializer<T>> getDeserializer(DeserializationContext<T> ctx)
      Description copied from interface: ValueDeserializers
      Gets a custom deserializer for the specified deserialization context.
      Specified by:
      getDeserializer in interface ValueDeserializers
      Type Parameters:
      T - Type of the value
      Parameters:
      ctx - Context representing the deserialization
      Returns:
      Optional containing the custom deserializer registered for the specified type or an empty optional if there is none
    • registerDeserializer

      public <T> void registerDeserializer(Class<T> forType, ValueDeserializer<T> deserializer)
      Description copied from interface: ValueDeserializers
      Registers the specified deserializer for the specified type.
      Specified by:
      registerDeserializer in interface ValueDeserializers
      Type Parameters:
      T - Value type
      Parameters:
      forType - Type to be deserialized using the specified deserializer
      deserializer - Deserializer to register
    • configure

      public void configure(Configuration configuration)
      Description copied from interface: Configurable
      Applies the specified configuration on this object.
      Specified by:
      configure in interface Configurable
      Parameters:
      configuration - Configuration to apply