-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add annotations to field getters, param getters and instance getters #22
Comments
From what I understand, adding these annotations would allow to use reflection in runtime to determine if given member is:
Which problems does that solve and how does that help with the questions that you've outlined above, i.e.:
? |
Yes
No, I think not. I just want to mark fields/getters/[setters], that generated from
Right now you are forced to use dirty haks to exclude fields, that is not fields, like checking name of field for leading underscore. With annotation you just go through all fields with these annotations
Initially, I hoped, that field sequence in the class will reflect order in |
If you want to build visualizer, you must rely on that fact, that internal fields begins with underscore. You can use the static field
_seqFields
to distinguish between parameters and structure fields.To distinguish between parameters and instances of the structure, you can see that there is a field with the same name, as getter method. If there is no field, it is anNo, this not work, instances also has backing field in classinstance
.But all these methods are fragile. I suggest introduce 3 annotations instead:
List of all related issues/PRs:
The text was updated successfully, but these errors were encountered: