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

[FEATURE] Add possibility to make builder non-public #2083

Closed
annam002 opened this issue Mar 27, 2019 · 0 comments
Closed

[FEATURE] Add possibility to make builder non-public #2083

annam002 opened this issue Mar 27, 2019 · 0 comments

Comments

@annam002
Copy link

The @builder annotation always creates a public builder class with public methods.
This is not always wanted; for package-private and protected classes, it does not make sense.
It would be nice to be able to define the access level for the builder, just like you can do it with constructors.

@Builder(access = AccessLevel.PACKAGE)
class TestMe {
	private final String test;
}

would generate

@Builder(access = AccessLevel.PACKAGE)
class TestMe {
	private final String test;

        static final class TestMeBuilder {
            //builder methods here
	}

}
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

1 participant