How to find all reference classes from a .class file?

Finding a class dependency is a common problem, but it may not be a trivial job to find all the reference classes from the .class file.

I saw the solution provided by Arne . But this solution does not work for the following situation:

 public class ClassA {
     private B b ;
     class B {
        ClassC c;
     } 
 }

since I cannot get the information for ClassC from the class ClassA.class and ClassA $ B.class.

Who knows how to deal with this situation?

Thank.

Robin

+3
source share

All Articles