lundi 17 octobre 2022

Immutables custom create and of methods

I am changing a library that uses Immutables. In the class that I change I just added a new variable and in the generated classes I see different signatures in the create and of methods.

ImmutableMyClass.of(previous variables ...,  int varNew)

ModifiableMyClass.create(previous variables ...,  int varNew)

Since there are users of this library that call the previous versions of these methods I need to keep previous versions while providing the new versions for a new feature; otherwise, apparently, I am breaking the backward compatibility.

How do I have Immutables create custom create and of methods?





Aucun commentaire:

Enregistrer un commentaire