I analyze bytecode of java and I have method descriptor
for example:
method name: add
method descriptor (Ljava.lang.Integer;Ljava.lang.Integer)Ljava.lang.Integer;
it can be read as: Integer add (Integer , Integer)
I want to add a marker in a line there method signature is in source code
for example:
-> public Integer add(java.lang.Integer a, Integer b) {
}
where -> is a marker I want to add.
IType interface defines IMethod getMethod(String methodName, String[] signatureParameters);
but signatureParameters are not these from bytecode (e.g. Ljava.lang.Integer) but for example QInteger or Qjava.lang.Integer (depends on how it's defined in source code)
for "a" and "b" parameters in my example above it would be Qjava.lang.Integer; and QInteger; respectively.
My question is:
Is there a way to convert values from bytecode or somehow find particular method having only bytecode (always fully-qualified) parameter names.
for "b".
The best solution would be:
myClass.getMethod("add", new String[] {"Ljava.lang.Integer;", "Ljava.lang.Integer;"});
but it doesn't work (It needs Eclipse specific signatures).
If it's not clear please tell me what should I describe in detail.