Exemplo n.º 1
0
 protected MethodNode getMethod(ClassNode cls, String method) {
   for (MethodNode mth : cls.getMethods()) {
     if (mth.getName().equals(method)) {
       return mth;
     }
   }
   fail("Method not found " + method + " in class " + cls);
   return null;
 }
Exemplo n.º 2
0
 private static void checkCode(ClassNode cls) {
   assertTrue(
       "Inconsistent cls: " + cls,
       !cls.contains(AFlag.INCONSISTENT_CODE) && !cls.contains(AType.JADX_ERROR));
   for (MethodNode mthNode : cls.getMethods()) {
     assertTrue(
         "Inconsistent method: " + mthNode,
         !mthNode.contains(AFlag.INCONSISTENT_CODE) && !mthNode.contains(AType.JADX_ERROR));
   }
   assertThat(cls.getCode().toString(), not(containsString("inconsistent")));
 }