Is there some way through the standard library or some already existing library to determine the degree of relation between two classes/interfaces in Java?
Let's say I have an object and a list of classes/interfaces. Now I basically want to know the one class of that list, that has the shortest inheritance-tree path to this object.
I already looked through the java.lang.reflect package and Class, but couldn't really find anything that would allow easy access to information like this. Is that perhaps already part of another library?