For example annotate a field for apply some kind of data validation, it’s a good thing?
a
altavir
01/05/2019, 7:44 PM
You can use reflections.
s
Saiedmomen
01/06/2019, 9:01 PM
Its highly dependant on the context. You will have to use reflection which may be slow.
Data validation might be better achieved by setters.
f
Francesco megna
01/06/2019, 10:30 PM
Thanks, I start to write a library for model validation using Annotation and Reflection, my fear is the performance of reflection process, but is an experiment
a
Angad
01/07/2019, 7:27 AM
As far as I remember, Spring boot also uses Annotations for validation. It might be a good reference to look into...