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

Turn parser ctors into builders #38

Open
gedl opened this issue Sep 15, 2018 · 2 comments
Open

Turn parser ctors into builders #38

gedl opened this issue Sep 15, 2018 · 2 comments

Comments

@gedl
Copy link
Contributor

gedl commented Sep 15, 2018

Some providers will have more complex instantiation for their readers. For example Maxmind can use a combination of ip versions and/or VPN information. The only mandatory file is the country code to country name mapper.

For this reason, the ctors should be turned into builders to be easier to choose which files to load.

This can also apply to other database providers.

@SavvasMichael
Copy link
Contributor

SavvasMichael commented Sep 15, 2018

Should we consider Lombok for this kind of functionality? A single annotation could provide you with a builder for a class, which will remove many lines of code and is exactly what we need.

We also get other nice to have stuff out of the box such as toString() method creation and getters and setters for fields, which we might choose to use, or not to. I have used it in the past and it I definitely think it makes a project look better overall. https://projectlombok.org/features/all

I could provide a PR showcasing Lombok(changing a couple of classes) and if its agreeable I can bake it in the project

@SavvasMichael
Copy link
Contributor

Discussion led to the fact that we don't want to introduce Lombok as it would drag in unwanted complexity for the users(lombok plugin-annotation processing etc)

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