Class MultipleObjectMappingConstructor

    • Constructor Detail

      • MultipleObjectMappingConstructor

        MultipleObjectMappingConstructor()
    • Method Detail

      • fromValue

         final <TO_TYPE extends Any> Unit fromValue(KProperty<TO_TYPE> $self, TO_TYPE value)

        Explicitly construct a mapping to TO from a value source value.

        For example

        Person::name fromValue "John Doe"

        will generate an explicit mapping, setting constructor parameter Person.name to "John Doe".

      • parameter

         final KProperty<?> parameter(String name)

        Reference a constructor parameter in lieu of a property reference, if it not exists as a property.

        For example

        parameter("name") fromProperty PersonDto::fullName

        will generate an explicit mapping, setting constructor parameter name to PersonDto.fullName.