Interface BeanIntrospectionMapper<D,​R>

  • Type Parameters:
    D - The object type.
    R - The result type
    All Superinterfaces:
    TypeMapper<D,​R>
    All Known Implementing Classes:
    DTOMapper, SqlDTOMapper
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface BeanIntrospectionMapper<D,​R>
    extends TypeMapper<D,​R>
    A TypeMapper that maps objects using a compile time computed BeanIntrospection.
    Since:
    1.0.0
    Author:
    graemerocher
    • Method Summary

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default java.lang.Object convert​(java.lang.Object value, io.micronaut.core.type.Argument<?> argument)  
      default R map​(D object, java.lang.Class<R> type)
      Map the given result set to the given object.
    • Method Detail

      • map

        @NonNull
        default R map​(@NonNull
                      D object,
                      @NonNull
                      java.lang.Class<R> type)
               throws io.micronaut.core.reflect.exception.InstantiationException
        Description copied from interface: TypeMapper
        Map the given result set to the given object.
        Specified by:
        map in interface TypeMapper<D,​R>
        Parameters:
        object - The object to map
        type - The type
        Returns:
        The mapped object
        Throws:
        io.micronaut.core.reflect.exception.InstantiationException
      • convert

        default java.lang.Object convert​(java.lang.Object value,
                                         io.micronaut.core.type.Argument<?> argument)