Package io.micronaut.serde
Interface Deserializer.DecoderContext
- All Superinterfaces:
DeserializerLocator,NamingStrategyLocator,PropertyReferenceManager
- Enclosing interface:
- Deserializer<T>
public static interface Deserializer.DecoderContext
extends PropertyReferenceManager, DeserializerLocator, NamingStrategyLocator
Context object passed to the
Deserializer.deserialize(Decoder, io.micronaut.serde.Deserializer.DecoderContext, io.micronaut.core.type.Argument) method along with the decoder.-
Method Summary
Modifier and TypeMethodDescriptiondefault @NonNull io.micronaut.core.convert.ConversionServicedefault @NonNull Optional<DeserializationConfiguration>Get theDeserializationConfigurationfor this context.default @NonNull Optional<SerdeConfiguration>Get theSerdeConfigurationfor this context.default boolean<B,P> @Nullable PropertyReference<B, P> resolveReference(@NonNull PropertyReference<B, P> reference) Resolve a reference for the given type and value.Methods inherited from interface io.micronaut.serde.DeserializerLocator
findCustomDeserializer, findDeserializer, findDeserializer, getDeserializableSubtypesMethods inherited from interface io.micronaut.serde.NamingStrategyLocator
findNamingStrategyMethods inherited from interface io.micronaut.serde.reference.PropertyReferenceManager
popManagedRef, pushManagedRef
-
Method Details
-
getConversionService
@NonNull default @NonNull io.micronaut.core.convert.ConversionService getConversionService()- Returns:
- Conversion service
-
hasView
- Parameters:
views- Views to check.- Returns:
trueiff any of the given views is enabled.
-
resolveReference
@Internal @Nullable <B,P> @Nullable PropertyReference<B,P> resolveReference(@NonNull @NonNull PropertyReference<B, P> reference) Resolve a reference for the given type and value.- Type Parameters:
B- The bean typeP- The generic type of the value- Parameters:
reference- The reference- Returns:
- The existing reference, a new one or
nullif serialization should be skipped
-
getSerdeConfiguration
Get theSerdeConfigurationfor this context.- Returns:
- The
SerdeConfiguration, or an empty optional if the default should be used - Since:
- 2.7.0
-
getDeserializationConfiguration
Get theDeserializationConfigurationfor this context.- Returns:
- The
DeserializationConfiguration, or an empty optional if the default should be used - Since:
- 2.7.0
-