public final String getMethodSignature(long classID, long methodID) {
CommandPacket command = new CommandPacket(
JDWPCommands.ReferenceTypeCommandSet.CommandSetID,
JDWPCommands.ReferenceTypeCommandSet.MethodsCommand);
command.setNextValueAsReferenceTypeID(classID);
ReplyPacket reply = checkReply(performCommand(command));
int methods = reply.getNextValueAsInt();
String value = null;
for (int i = 0; i < methods; i++) {
long mID = reply.getNextValueAsMethodID();
reply.getNextValueAsString(); // name of the method; is not used
String methodSign = reply.getNextValueAsString();
reply.getNextValueAsInt();
if (mID == methodID) {
value = methodSign;
value = value.replaceAll("/", ".");
int lastRoundBracketIndex = value.lastIndexOf(")");
value = value.substring(0, lastRoundBracketIndex + 1);