Package jadx.core.dex.nodes

Examples of jadx.core.dex.nodes.ClassNode


    }
  }

  @Test
  public void test() {
    ClassNode cls = getClassNode(TestCls.class);
    String code = cls.getCode().toString();

    assertThat(code, containsString("return 255;"));
    assertThat(code, containsString("return arg0 + 1;"));
    assertThat(code, containsString("return i > 128 ? arg0.toString() + ret.toString() : Integer.valueOf(i);"));
    assertThat(code, containsString("return arg0 + 2;"));
View Full Code Here


    }
  }

  @Test
  public void test() {
    ClassNode cls = getClassNode(TestCls.class);
    String code = cls.getCode().toString();

    assertThat(code, containsOne(indent(3) + "for (IDexTreeVisitor pass : this.passes) {"));
    assertThat(code, not(containsString("iterator;")));
  }
View Full Code Here

    }
  }

  @Test
  public void test() {
    ClassNode cls = getClassNode(TestCls.class);
    MethodNode mth = getMethod(cls, "method");

    String code = cls.getCode().toString();
    assertThat(code, containsString("return (int[]) o;"));

    List<InsnNode> insns = mth.getBasicBlocks().get(1).getInstructions();
    assertEquals(insns.size(), 1);
    InsnNode insnNode = insns.get(0);
View Full Code Here

    }
  }

  @Test
  public void test() {
    ClassNode cls = getClassNode(TestCls.class);
    String code = cls.getCode().toString();

    assertThat(code, containsString("int i;"));
    assertThat(code, containsString("i = 2;"));
    assertThat(code, containsString("i = 3;"));
    assertThat(code, containsString("s = null;"));
View Full Code Here

    }
  }

  @Test
  public void test() {
    ClassNode cls = getClassNode(TestCls.class);
    String code = cls.getCode().toString();

    assertThat(code, containsString("static {"));
    assertThat(code, containsString("private static void f() {"));
  }
View Full Code Here

    }
  }

  @Test
  public void test() {
    ClassNode cls = getClassNode(TestCls.class);
    String code = cls.getCode().toString();

    assertThat(code, containsString("} catch (InvocationTargetException e) {"));
    assertThat(code, containsString("pass = false;"));
    assertThat(code, containsString("exc = e.getCause();"));
    assertThat(code, containsString("System.err.println(\"Class '\" + clsName + \"' not found\");"));
View Full Code Here

    }
  }

  @Test
  public void test() {
    ClassNode cls = getClassNode(TestCls.class);
    String code = cls.getCode().toString();

    assertThat(code, containsString("mthWildcard(List<?> list)"));
    assertThat(code, containsString("mthExtends(List<? extends A> list)"));
    assertThat(code, containsString("mthSuper(List<? super A> list)"));
  }
View Full Code Here

    }
  }

  @Test
  public void test() {
    ClassNode cls = getClassNode(TestCls.class);
    String code = cls.getCode().toString();

    assertThat(code, containsOne("return a ? b : c;"));
    assertThat(code, containsOne("return (a ? b : c) ? 1 : 2;"));
    assertThat(code, not(containsString("if")));
    assertThat(code, not(containsString("else")));
View Full Code Here

    }
  }

  @Test
  public void test() {
    ClassNode cls = getClassNode(TestCls.class);
    String code = cls.getCode().toString();

    assertEquals(5, count(code, "break;"));
    assertEquals(1, count(code, "System.out.println(s);"));
    assertEquals(1, count(code, "System.out.println(\"Not Reach\");"));
View Full Code Here

  }

  @Test
  public void test() {
    noDebugInfo();
    ClassNode cls = getClassNode(TestCls.class);
    String code = cls.getCode().toString();

    assertThat(code, not(containsString("int i2++;")));
    assertThat(code, containsOne("int i = 0;"));
    assertThat(code, containsOne("i++;"));
  }
View Full Code Here

TOP

Related Classes of jadx.core.dex.nodes.ClassNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.