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 TypeMethodDescriptionvoidconfigure(Configuration configuration) Applies the specified configuration on this object.<T> Optional<ValueDeserializer<T>>Gets a custom deserializer for the specified deserialization context.<T> booleanhasCustomDeserializer(Class<T> type) Checks whether a custom deserializer is registered for the specified type.<T> voidregisterDeserializer(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:ValueDeserializersChecks whether a custom deserializer is registered for the specified type.- Specified by:
hasCustomDeserializerin 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:ValueDeserializersGets a custom deserializer for the specified deserialization context.- Specified by:
getDeserializerin 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:ValueDeserializersRegisters the specified deserializer for the specified type.- Specified by:
registerDeserializerin interfaceValueDeserializers- Type Parameters:
T- Value type- Parameters:
forType- Type to be deserialized using the specified deserializerdeserializer- Deserializer to register
-
configure
Description copied from interface:ConfigurableApplies the specified configuration on this object.- Specified by:
configurein interfaceConfigurable- Parameters:
configuration- Configuration to apply
-