Module dev.metaschema.databind
Package dev.metaschema.databind.io.yaml
Class DefaultYamlDeserializer<CLASS extends IBoundObject>
java.lang.Object
dev.metaschema.databind.io.AbstractDeserializer<CLASS>
dev.metaschema.databind.io.json.DefaultJsonDeserializer<CLASS>
dev.metaschema.databind.io.yaml.DefaultYamlDeserializer<CLASS>
- Type Parameters:
CLASS- the Java type of the bound object to deserialize
- All Implemented Interfaces:
IConfiguration<DeserializationFeature<?>>,IMutableConfiguration<DeserializationFeature<?>>,IDeserializer<CLASS>
public class DefaultYamlDeserializer<CLASS extends IBoundObject>
extends DefaultJsonDeserializer<CLASS>
Deserializes YAML content into bound Java objects.
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultYamlDeserializer(IBoundDefinitionModelAssembly definition) Construct a new YAML deserializer that will parse the bound class identified by theclassBinding. -
Method Summary
Modifier and TypeMethodDescription<V> Vget(DeserializationFeature<?> feature) Get the configuration value of the providedfeature.protected IBindingContextRetrieve the binding context associated with the serializer.protected IMutableConfiguration<DeserializationFeature<?>>Get the current configuration of the serializer/deserializer.protected IBoundDefinitionModelAssemblyRetrieve the bound class information associated with the assembly that the serializer/deserializer will write/read data from.Get the mapping of each feature mapped to its value.booleanisFeatureEnabled(DeserializationFeature<?> feature) Determines if a specific feature is enabled.protected com.fasterxml.jackson.dataformat.yaml.YAMLFactoryGet a JSON factory instance.Methods inherited from class dev.metaschema.databind.io.json.DefaultJsonDeserializer
configurationChanged, deserializeToNodeItemInternal, deserializeToValueInternal, getJsonFactory, newJsonParser, resetFactoryMethods inherited from class dev.metaschema.databind.io.AbstractDeserializer
applyConfiguration, deserializeToNodeItem, deserializeToValue, disableFeature, enableFeature, getConstraintValidationHandler, set, setConstraintValidationHandlerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.metaschema.core.configuration.IConfiguration
get, getFeatureValues, isFeatureEnabledMethods inherited from interface dev.metaschema.databind.io.IDeserializer
deserialize, deserialize, deserialize, deserialize, deserialize, deserializeToNodeItem, isValidating
-
Constructor Details
-
DefaultYamlDeserializer
Construct a new YAML deserializer that will parse the bound class identified by theclassBinding.- Parameters:
definition- the bound class information for the Java type this deserializer is operating on
-
-
Method Details
-
newFactoryInstance
protected com.fasterxml.jackson.dataformat.yaml.YAMLFactory newFactoryInstance()Get a JSON factory instance.This method can be used by sub-classes to create a customized factory instance.
This method provides a YAML version of the JSON factory.
- Overrides:
newFactoryInstancein classDefaultJsonDeserializer<CLASS extends IBoundObject>- Returns:
- the factory
-
getBindingContext
Retrieve the binding context associated with the serializer.- Returns:
- the binding context
-
getDefinition
Retrieve the bound class information associated with the assembly that the serializer/deserializer will write/read data from.- Returns:
- the class binding for the Module assembly
-
getConfiguration
Get the current configuration of the serializer/deserializer.- Returns:
- the configuration
-
isFeatureEnabled
Description copied from interface:IConfigurationDetermines if a specific feature is enabled.- Specified by:
isFeatureEnabledin interfaceIConfiguration<T extends IConfigurationFeature<?>>- Parameters:
feature- the feature to check for- Returns:
trueif the feature is enabled, orfalseotherwise- See Also:
-
getFeatureValues
Description copied from interface:IConfigurationGet the mapping of each feature mapped to its value.- Specified by:
getFeatureValuesin interfaceIConfiguration<T extends IConfigurationFeature<?>>- Returns:
- the mapping
-
get
Description copied from interface:IConfigurationGet the configuration value of the providedfeature.- Specified by:
getin interfaceIConfiguration<T extends IConfigurationFeature<?>>- Type Parameters:
V- the value type- Parameters:
feature- the requested feature- Returns:
- the value of the feature
-