Class DefaultYamlDeserializer<CLASS>
- java.lang.Object
-
- gov.nist.secauto.metaschema.databind.io.AbstractDeserializer<CLASS>
-
- gov.nist.secauto.metaschema.databind.io.json.DefaultJsonDeserializer<CLASS>
-
- gov.nist.secauto.metaschema.databind.io.yaml.DefaultYamlDeserializer<CLASS>
-
- All Implemented Interfaces:
IConfiguration<DeserializationFeature<?>>,IMutableConfiguration<DeserializationFeature<?>>,IDeserializer<CLASS>
public class DefaultYamlDeserializer<CLASS> extends DefaultJsonDeserializer<CLASS>
-
-
Constructor Summary
Constructors Constructor Description DefaultYamlDeserializer(IAssemblyClassBinding classBinding)Construct a new YAML deserializer that will parse the bound class identified by theclassBinding.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidconfigurationChanged(IMutableConfiguration<T> config)<V> Vget(T feature)protected IBindingContextgetBindingContext()Retrieve the binding context associated with the serializer.protected IAssemblyClassBindinggetClassBinding()Retrieve the bound class information associated with the assembly that the serializer/deserializer will write/read data from.protected IMutableConfiguration<T>getConfiguration()Get the current configuration of the serializer/deserializer.Map<T,Object>getFeatureValues()booleanisFeatureEnabled(T feature)protected com.fasterxml.jackson.dataformat.yaml.YAMLFactorynewJsonFactoryInstance()Get a JSON factory instance.-
Methods inherited from class gov.nist.secauto.metaschema.databind.io.json.DefaultJsonDeserializer
deserializeToNodeItemInternal, deserializeToValue, getJsonFactory, newJsonParser
-
Methods inherited from class gov.nist.secauto.metaschema.databind.io.AbstractDeserializer
applyConfiguration, deserializeToNodeItem, disableFeature, enableFeature, getConstraintValidationHandler, set, setConstraintValidationHandler
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface gov.nist.secauto.metaschema.core.configuration.IConfiguration
get, getFeatureValues, isFeatureEnabled
-
Methods inherited from interface gov.nist.secauto.metaschema.databind.io.IDeserializer
deserialize, deserialize, deserialize, deserialize, deserialize, deserializeToNodeItem, isValidating
-
-
-
-
Constructor Detail
-
DefaultYamlDeserializer
public DefaultYamlDeserializer(@NonNull IAssemblyClassBinding classBinding)
Construct a new YAML deserializer that will parse the bound class identified by theclassBinding.- Parameters:
classBinding- the bound class information for the Java type this deserializer is operating on
-
-
Method Detail
-
newJsonFactoryInstance
protected com.fasterxml.jackson.dataformat.yaml.YAMLFactory newJsonFactoryInstance()
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:
newJsonFactoryInstancein classDefaultJsonDeserializer<CLASS>- Returns:
- the factory
-
getBindingContext
@NonNull protected IBindingContext getBindingContext()
Retrieve the binding context associated with the serializer.- Returns:
- the binding context
-
getClassBinding
@NonNull protected IAssemblyClassBinding getClassBinding()
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
-
configurationChanged
protected void configurationChanged(@NonNull IMutableConfiguration<T> config)
-
getConfiguration
@NonNull protected IMutableConfiguration<T> getConfiguration()
Get the current configuration of the serializer/deserializer.- Returns:
- the configuration
-
isFeatureEnabled
public boolean isFeatureEnabled(T feature)
- Specified by:
isFeatureEnabledin interfaceIConfiguration<T extends IConfigurationFeature<?>>
-
getFeatureValues
public Map<T,Object> getFeatureValues()
- Specified by:
getFeatureValuesin interfaceIConfiguration<T extends IConfigurationFeature<?>>
-
get
public <V> V get(T feature)
- Specified by:
getin interfaceIConfiguration<T extends IConfigurationFeature<?>>
-
-