I would get all fields set in projections interfaces. When I use getDeclaredFields on a class it's ok, but on projection interface return an empty list. Do you know a way to get them?
Asked
Active
Viewed 162 times
1 Answers
0
The interface itself doesn't have any fields because it's basically a thing that declares for you some possibillity, i.e. what can be done using it, so there is no any info about fields. But you can use intrf.getClass().getInterfaces()
instead to take a list of interfaces related to your object. Then iterate through it and invoke a getDeclaredMethods()
for a desired interface

Yuriy Tsarkov
- 2,461
- 2
- 14
- 28
-
Thanks for your answer was really usefull! – Robin Lamberte Sep 03 '19 at 11:50
-
you are welcome) please upvote the answer and accept it: https://stackoverflow.com/help/someone-answers – Yuriy Tsarkov Sep 03 '19 at 11:54