record-builder icon indicating copy to clipboard operation
record-builder copied to clipboard

Invoker builder

Open gdupontf opened this issue 2 years ago • 1 comments

I was wondering if it was possible to add functionality to create a builder around a method, with the "build" method actually invoking the target method?

I can in fact emulate this using Lombok, but this library is much more flexible.

On the surface, it looks like "just" an underlying record and a builder with a non-constructor target method and return type but in practice I know there might be gotchas.

gdupontf avatar Apr 12 '24 23:04 gdupontf

Can you write an pseudo example of what that would be?

Randgalt avatar Apr 13 '24 17:04 Randgalt