Closed clamothebb closed 2 years ago
Oh! also, our current practice is to update copyright date on all files that you've updated. So you should probably do that in the files you've touched (not just created) in this PR.
I check the box for "update copyright" in the IDEA commit dialog and have it update automatically.
Thanks for the reviews. I updated the copyrights. Do the reviewers or the PR author typically perform the merge in this project? I'd love to have a version of this released soon so I can use it when building new POJOs in bzmono.
It's typically the PR author that performs the merge. Please choose "Squash and merge" so that all your changes are merged as a single commit into master.
Adds support for Java 8's
-parameters
option, so constructor parameters do not need to be reiterated inB2Json.constructor#params
. This enables DRYer B2Json usage and allows developers to generate complete constructors for POJOs using IDE tools.Previous syntax (still supported):
New syntax supported:
This doesn't introduce any dependencies. It continues to support classes not compiled with javac's
-parameters
argument. This doesn't have any effect on existing classes, since inference is only used whenparams
are not provided.Locally, I modified and ran the entire
B2JsonTest
suite with inferred parameters, with the exception oftestParamListedTwice
since it's impossible to list a param twice in an actual constructor. All tests passed. This PR includes focused tests for this new functionality.