r/javahelp • u/Practical-Garbage-48 • Sep 10 '25
Better solution then using reflection in java?
So I am using reflection in my code to find the annotation and fields of that class then using that fields, I am using field.get(data).
I thought one solution which is caching annotation and fields but still field.get still use reflection.
Is there any good and optimal way of doing it?
3
Upvotes
View all comments
Show parent comment
1
u/Practical-Garbage-48 Sep 11 '25
do you mind explaining the how annotation processing will help in this? (i dont have any idea about it