Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for 'with'/builder-style SETTER_FORMAT #191

Open
janlukasik opened this issue Mar 2, 2018 · 2 comments
Open

Support for 'with'/builder-style SETTER_FORMAT #191

janlukasik opened this issue Mar 2, 2018 · 2 comments

Comments

@janlukasik
Copy link

Hi

As far as I can see, selma supports setters that starts with 'set' only; unfortunately I have a lots of classes that use setters with "with" prefix.
Is it possible to support builder-style SETTER_FORMAT (MethodWrapper class) in selma?
Something like: SETTER_FORMAT = "(set|with)(.*)"?

Looking forward to your response,
Regards,
Jan Lukasik

@slemesle
Copy link
Collaborator

slemesle commented Mar 6, 2018

Hi,
with is not a valid Java bean convention. But the with syntax could be easy to support as you explained it.
I am just wondering if that is a good thing to support this because it does not respect the convention and the 'with' syntax can be used by others for something different.
Perhaps it should be accepted based on a specific configuration parameter.

What you think about it ?

@janlukasik
Copy link
Author

Hi
I agree with you - 'with' it is not a valid Java bean convention but seems to be often used (at least in project I'm working in).
Can it be used for something else? Really don't know - let's assume yes and jump to option you propose:
a specific configuration parameter, as it sounds good to me.
Do you have any example/idea about such implementation/selma configuration for 'with' setters?
That does not seem as simple as just change of SETTER_FORMAT patern in the code. And - frankly speaking - don't know how to do that. Could you please help to sort it out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants