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

allow builder method and protected constructor #1493

Open
caleb-cushing0-kr opened this issue Nov 27, 2023 · 1 comment
Open

allow builder method and protected constructor #1493

caleb-cushing0-kr opened this issue Nov 27, 2023 · 1 comment

Comments

@caleb-cushing0-kr
Copy link

I would like a static builder factory with a protected constructor option. Hibernate and Jackson both do not require public constructors.

@Value.Style(
    protectedNoargConstructor = true,
    builder = "builder", // shouldn't be needed "new" would also do as today, but public
)

I kind of still want this as a more readable api

@Value.Style( constructorPrivacy = Privacy.PACKAGE )
@caleb-cushing0-kr
Copy link
Author

my workaround, which may be better overall is simply to write my own static factor on the originating class/interface

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