Sanyam Goel
Sanyam Goel

Reputation: 2180

Need help on method signature

I have found that call stack helps in finding the line number of a method invoker in source code, but suppose I am working on bytecodes and do not have source code. I need to find some way of finding the caller methods signature. Please suggest some solution.

Thanks in advance

Upvotes: 1

Views: 90

Answers (2)

opyate
opyate

Reputation: 5428

Try javap, e.g.

$ ls
ICODecoder.class

$ javap ICODecoder    
public class net.sf.image4j.codec.ico.ICODecoder extends java.lang.Object{
    public static java.util.List read(java.io.File)       throws java.io.IOException;
    public static java.util.List readExt(java.io.File)       throws java.io.IOException;
    public static java.util.List read(java.io.InputStream)       throws java.io.IOException;
    public static java.util.List readExt(java.io.InputStream)       throws java.io.IOException;
}

Upvotes: 1

Tusc
Tusc

Reputation: 2002

new Exception().printStacktrace(); Then use a decompiler

Upvotes: 0

Related Questions