Randgalt / record-builder

Record builder generator for Java records
Apache License 2.0
758 stars 55 forks source link

Support copying component annotations to builder #33

Closed Randgalt closed 3 years ago

Randgalt commented 3 years ago

Closes #30

Randgalt commented 3 years ago

run a test that would let me check that what was generated is what i expect

@aowss the issue with tests is that if the annotation processor fails the code doesn't even compile so it's very hard to write any kind of test. What I have is annotated classes and I can check the generation manually. I might be able to write some unit tests to double check invariants or something but I haven't gotten around to that.

Randgalt commented 3 years ago

I thought you wanted the annotations added to the constructor also.

The constructor is private. I didn't think any code analyzer would be able to interact with it. All public methods get the appropriate annotation. Is there a reason to annotate the constructor too?

Randgalt commented 3 years ago

I wonder if you should not add a parameter that is not annotated in the Annotated record ? just to make sure that things work when there is a mix.

Good idea