Пример #1
0
 private static void appendClassOffset(ByteCodeClass bc, List<Integer> clsIds) {
   if (bc.getBaseClassObject() != null) {
     if (!clsIds.contains(bc.getBaseClassObject().getClassOffset())) {
       clsIds.add(bc.getBaseClassObject().getClassOffset());
       appendClassOffset(bc.getBaseClassObject(), clsIds);
     }
   }
   if (bc.getBaseInterfacesObject() != null) {
     for (ByteCodeClass c : bc.getBaseInterfacesObject()) {
       if (c != null && !clsIds.contains(c.getClassOffset())) {
         clsIds.add(c.getClassOffset());
         if (c.getBaseClassObject() != null) {
           appendClassOffset(c, clsIds);
         }
       }
     }
   }
 }
Пример #2
0
 private static boolean isMethodUsedByBaseClassOrInterface(BytecodeMethod mtd, ByteCodeClass cls) {
   boolean b = checkMethodUsedByBaseClassOrInterface(mtd, cls.getBaseClassObject());
   if (b) {
     return true;
   }
   for (ByteCodeClass bc : cls.getBaseInterfacesObject()) {
     b = checkMethodUsedByBaseClassOrInterface(mtd, bc);
     if (b) {
       return true;
     }
   }
   return false;
 }