This works:
public void visitCode(final Code obj) {
ConstantPoolGen cpg = new
ConstantPoolGen(javaClass.getConstantPool());
InstructionList list = new InstructionList(obj.getCode());
Iterator iter = list.iterator();
while
quick guess: check if the previous instruction is ldc.
HTH,
Stephan
On 10.09.2017 21:50, Showalter, Jim wrote:
The use case is, suppose you want to recover the source from a .class file.
In the original source, it said:
public class SomeExperiment {
public static void main(String[]
The use case is, suppose you want to recover the source from a .class file.
In the original source, it said:
public class SomeExperiment {
public static void main(String[] args) {
System.out.println(SomeOtherClass.class); <<< WANT TO RECOVER THE ".class"
FROM HERE
}
}
In the