public static String signatureClass(String sig){
  int pos=sig.indexOf(": ");
  return sig.substring(1,pos);
}

public static String signatureClass ( String sig ) { int pos = sig . indexOf ( ": " ) ; return sig . substring ( 1 , pos ) ; }
given a method signature , returns a substring denoting the class name .
