سؤال

Is there a way to find out what imports a class has?

In this question: Jon Skeet says that you can't do this using reflection, but

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.

This is what I want to know how to do.

هل كانت مفيدة؟

المحلول

Here is an old tutorial for ASM bytecode manipulation framework explaining how to read class dependencies with ASM.

نصائح أخرى

You can use a Java Decompiler like this one: Java Decompiler

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top