Interface SerdeIntrospections

All Known Implementing Classes:
DefaultSerdeIntrospections

public interface SerdeIntrospections
Interface that abstracts the lookup for introspections usable for serialization and/or deserialization.
  • Method Summary

    Modifier and Type
    Method
    Description
    default <T> @NonNull Collection<io.micronaut.core.beans.BeanIntrospection<? extends T>>
    Gets an subtype introspection for the given type for deserialization.
    default @NonNull io.micronaut.core.beans.BeanIntrospector
    The bean introspector to use.
    <T> @NonNull io.micronaut.core.beans.BeanIntrospection<T>
    getDeserializableIntrospection(@NonNull io.micronaut.core.type.Argument<T> type)
    Gets an introspection for the given type for deserialization.
    <T> @NonNull io.micronaut.core.beans.BeanIntrospection<T>
    getSerializableIntrospection(@NonNull io.micronaut.core.type.Argument<T> type)
    Gets an introspection for the given type for serialization.
  • Method Details

    • getBeanIntrospector

      @NonNull default @NonNull io.micronaut.core.beans.BeanIntrospector getBeanIntrospector()
      The bean introspector to use.
      Returns:
      The introspector
    • getSerializableIntrospection

      @NonNull <T> @NonNull io.micronaut.core.beans.BeanIntrospection<T> getSerializableIntrospection(@NonNull @NonNull io.micronaut.core.type.Argument<T> type)
      Gets an introspection for the given type for serialization.
      Type Parameters:
      T - The generic type
      Parameters:
      type - The type
      Returns:
      The introspection, never null
      Throws:
      io.micronaut.core.beans.exceptions.IntrospectionException - if no introspection exists
    • getDeserializableIntrospection

      @NonNull <T> @NonNull io.micronaut.core.beans.BeanIntrospection<T> getDeserializableIntrospection(@NonNull @NonNull io.micronaut.core.type.Argument<T> type)
      Gets an introspection for the given type for deserialization.
      Type Parameters:
      T - The generic type
      Parameters:
      type - The type
      Returns:
      The introspection, never null
      Throws:
      io.micronaut.core.beans.exceptions.IntrospectionException - if no introspection exists
    • findSubtypeDeserializables

      @NonNull default <T> @NonNull Collection<io.micronaut.core.beans.BeanIntrospection<? extends T>> findSubtypeDeserializables(@NonNull @NonNull Class<T> type)
      Gets an subtype introspection for the given type for deserialization.
      Type Parameters:
      T - The generic type
      Parameters:
      type - The type
      Returns:
      A collection of introspections, never null