tags:

views:

36

answers:

1

For adding instrumentation roots to a Profiler, I need to write the method signature.
For example, in case of the method:

String toString()

The VM Method signature is

()Ljava/lang/String;

Question is, is there any way to check such signatures in Eclipse if you have the source code? Is there any shortcut to see this?

I want to check this manually

+1  A: 

Yes, if you open the compiled class file without linking the source (easiest way is simply to do File -> Open File and look for the compiled class file), then Eclipse shows you a decompiled version of the Java file. You can see for example:

// Method descriptor #15 ([Ljava/lang/String;)V
// Stack: 4, Locals: 4
public static void main(java.lang.String[] args);

The first Method descriptor shows the signature.

Marc