Skip to content

Support "real" fluent accessors (getters/setters) #170

@spirann

Description

@spirann

The actual support of so called "fluent" setters is more a support of "chained" setters.

Mapper<FluentSetterDto, FluentSetterDto> m = Mapping.from(FluentSetterDto.class)
        .to(FluentSetterDto.class)
        .allowFluentSetters() // **should be called "allowChainedSetters()"**
        .mapper();
FluentSetterDto expected = new FluentSetterDto().setInteger(5)
        .setI(22)
        .setS("str")
        .setB1(true)
        .setB2(true);
FluentSetterDto actual = m.map(expected);

Fluent accessors are using directly the name of the attributes (see Java records and Lombok Accessors)

FluentSetterDto expected = new FluentSetterDto().integer(5)
        .i(22)
        .s("str")
        .b1(true)
        .b2(true);

But they are not currently supported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions