I'd like to obtain the list of imports a class has. Since this is removed by the compiler, I suppose via reflection one could scan through the class, it's methods, fields and so on and collect a list of classes which are required in order for the classloader to load the class. Is there some sort of library, tutorial, or article you could point me at so I could better understand how this can be done? (I understand similar questions have been asked, but I could not find a proper answer and I'm quite sure this should be possible). I saw some examples showing how you could do it, if you had the sources, but that would not necessarily be the case in my scenario.
Many thanks in advance!