title: Java find out what imports a .class has
body: <p>Is there a way to find out what imports a class has?</p>
  
  <p>In <a href="https://stackoverflow.com/questions/5701305/how-to-get-all-imports-defined-in-a-class-using-java-reflection">this</a> question: Jon Skeet says that you can't do this using reflection, but</p>
  
  <blockquote>
    <p>If you want to find all the types used within the compiled code,
    that's a slightly different matter. You may want to look at BCEL as a
    way of analyzing bytecode.</p>
  </blockquote>
  
  <p>This is what I want to know how to do.</p>