Skip to content

Implement Fields annotation#41

Closed
Perwein wants to merge 1 commit intojeyben:masterfrom
Perwein:fields
Closed

Implement Fields annotation#41
Perwein wants to merge 1 commit intojeyben:masterfrom
Perwein:fields

Conversation

@Perwein
Copy link
Copy Markdown

@Perwein Perwein commented Jul 19, 2016

Hey!

I implemented this because I am using fixedformat4j in a project. If you are interested, it would be nice to get it merged upstream. Looking forward for your comments and suggestions!

@maxsap
Copy link
Copy Markdown

maxsap commented Mar 13, 2017

+1

1 similar comment
@shifuddin-masud-sixt
Copy link
Copy Markdown

+1

@jeyben
Copy link
Copy Markdown
Owner

jeyben commented Apr 8, 2026

I will proably implement it as a @RepeatedField annotation instead.
Otherwise the @Fields annotation is overloaded in functionality and can be misconfigured to have both multiple @Field annotations AND an count. Hard to make clear for a user what happens.

The @Fields annotation works well, when the same data is in several (not necessary repeated right after eachother) places in the same row - while a @RepeatedField will work for fields right after eachother

@jeyben
Copy link
Copy Markdown
Owner

jeyben commented Apr 8, 2026

Second thought.
I think it is more clean to add it to the @Field annotation and validate it is added to a Collection or Array

@jeyben
Copy link
Copy Markdown
Owner

jeyben commented Apr 9, 2026

Implemented as a count property on the @Field annotation from version 1.6.0

@jeyben jeyben closed this Apr 9, 2026
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

Successfully merging this pull request may close these issues.

4 participants