Class CommonValueDeserializers
java.lang.Object
cz.cvut.kbss.jsonld.deserialization.CommonValueDeserializers
- All Implemented Interfaces:
Configurable
,ValueDeserializers
Manages deserializers for one deserialization process.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
configure
(Configuration configuration) Applies the specified configuration on this object.<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.
-
Constructor Details
-
CommonValueDeserializers
public CommonValueDeserializers()
-
-
Method Details
-
hasCustomDeserializer
Description copied from interface:ValueDeserializers
Checks whether a custom deserializer is registered for the specified type.- Specified by:
hasCustomDeserializer
in interfaceValueDeserializers
- Type Parameters:
T
- Type of value- Parameters:
type
- Type to check for custom deserializer for- Returns:
- Whether a custom deserializer exists
-
getDeserializer
Description copied from interface:ValueDeserializers
Gets a custom deserializer for the specified deserialization context.- Specified by:
getDeserializer
in interfaceValueDeserializers
- 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
Description copied from interface:ValueDeserializers
Registers the specified deserializer for the specified type.- Specified by:
registerDeserializer
in interfaceValueDeserializers
- Type Parameters:
T
- Value type- Parameters:
forType
- Type to be deserialized using the specified deserializerdeserializer
- Deserializer to register
-
configure
Description copied from interface:Configurable
Applies the specified configuration on this object.- Specified by:
configure
in interfaceConfigurable
- Parameters:
configuration
- Configuration to apply
-