Fix p2ql usage of reflection in Java 16

p2ql does use reflection for some queries. Java 16 added restrictions on
accessibility, such as non-public method from Java API modules can
strictly not be invoked any more.
So instead of blindly calling the first method match, we crawl the type
hierarchy for a method that match and is accessible (possibly from a
super type or interface).

One example is LinkedHashMap$Entry#getValue() now becoming not
accessible at all in Java 16; we then navigate type hierarchy to resolve
to Map$Entry#getValue(), which is accessible API.

Change-Id: Idd58a4e7a64faf7955b81aaa1c2ce342a2297c8d
Signed-off-by: Mickael Istria <mistria@redhat.com>
1 file changed