예제 #1
0
 // TODO this is not sufficient only does method names not line locations
 public Location resolveLocation(String location) {
   DalvikUtils.LOGGER.warn("line locations not yet implemented!");
   location = location.trim();
   Location loc = null;
   int endIdx = location.lastIndexOf(".");
   if (endIdx != -1) {
     String className = location.substring(0, endIdx);
     ReferenceType cr = this.findClassType(className);
     if (cr != null) {
       for (Method m : cr.allMethods()) {
         // TODO need to think on this comparison ...
         if (m.toString().contains(location)) {
           loc = m.location();
           break;
         }
       }
     }
   }
   return loc;
 }
 public String toString() {
   return name() + " in " + method.toString() + "@" + scopeStart.toString();
 }