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

Generate Builder for model classes #10

Closed
kobylynskyi opened this issue Sep 18, 2019 · 2 comments · Fixed by #54
Closed

Generate Builder for model classes #10

kobylynskyi opened this issue Sep 18, 2019 · 2 comments · Fixed by #54
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@kobylynskyi
Copy link
Owner

https://www.vogella.com/tutorials/DesignPatternBuilder/article.html

@kobylynskyi kobylynskyi added the enhancement New feature or request label Sep 18, 2019
@kobylynskyi kobylynskyi self-assigned this Sep 20, 2019
@timbonicus
Copy link

This would be a great enhancement. I'm replacing an interface/builder model using AutoMatter with the maven plugin. I was spelunking around the repo trying to discover if I could generate the same interface/builder.

For my use case the ideal generated output would be:

package com.mycompany.model;

import io.norberg.automatter.AutoMatter;

@AutoMatter
public interface MyClass {
  String field1();
  String field2();
}

Then AutoMatter could take care of the builder/validation.

@kobylynskyi kobylynskyi removed their assignment Nov 1, 2019
@valinha
Copy link
Contributor

valinha commented Dec 5, 2019

Another option is to use Lombok @builder ( i prefer lombok 😉 )

@kobylynskyi kobylynskyi self-assigned this Dec 5, 2019
kobylynskyi added a commit that referenced this issue Dec 7, 2019
* Introduce model annotations (for Lombok) #10

* Unit tests for MappingConfig

* Remove unused import in MappingConfig

* Remove code related to modelAnnotations
@kobylynskyi kobylynskyi removed their assignment Mar 30, 2020
@kobylynskyi kobylynskyi added this to the 1.6.0 milestone Apr 6, 2020
@kobylynskyi kobylynskyi self-assigned this Apr 6, 2020
kobylynskyi added a commit that referenced this issue Apr 6, 2020
kobylynskyi added a commit that referenced this issue Apr 7, 2020
kobylynskyi added a commit that referenced this issue Apr 7, 2020
* Generate Builder for model classes #10

* Tests for MappingConfig #10

* Add Builder config to Maven/Gradle plugins #10

* More coverage for MappingConfig #10

* Fix CI config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants