Interface ValueDeserializers
- All Superinterfaces:
Configurable
- All Known Implementing Classes:
CommonValueDeserializers
Manages custom deserializers.
-
Method Summary
Modifier and TypeMethodDescription<T> Optional<ValueDeserializer<T>>
Gets a custom deserializer for the specified deserialization context.<T> boolean
hasCustomDeserializer
(Class<T> type) Checks whether a custom deserializer is registered for the specified type.<T> void
registerDeserializer
(Class<T> forType, ValueDeserializer<T> deserializer) Registers the specified deserializer for the specified type.Methods inherited from interface cz.cvut.kbss.jsonld.common.Configurable
configure
-
Method Details
-
hasCustomDeserializer
Checks whether a custom deserializer is registered for the specified type.- Type Parameters:
T
- Type of value- Parameters:
type
- Type to check for custom deserializer for- Returns:
- Whether a custom deserializer exists
-
getDeserializer
Gets a custom deserializer for the specified deserialization context.- 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
Registers the specified deserializer for the specified type.- Type Parameters:
T
- Value type- Parameters:
forType
- Type to be deserialized using the specified deserializerdeserializer
- Deserializer to register
-