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, containsOne("try {"));
    assertThat(code, containsOne("if (b) {"));
    assertThat(code, containsOne("throw new Exception();"));
    assertThat(code, containsOne("while (f()) {"));
View Full Code Here


    }
  }

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

    assertThat(code, not(containsString("(-1)")));
    assertThat(code, not(containsString("return;")));

    assertThat(code, containsString("return obj instanceof String ? ((String) obj).length() : 0;"));
View Full Code Here

    }
  }

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

    assertThat(code, containsString("case '/':"));
    assertThat(code, containsString(indent(5) + "break;"));
    assertThat(code, containsString(indent(4) + "default:"));
View Full Code Here

    }
  }

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

    assertThat(code, containsString("Class<?>[] a ="));
    assertThat(code, not(containsString("Class[] a =")));
  }
View Full Code Here

  }

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

    for (int i = 1; i <= 7; i++) {
      assertThat(code, containsOne("\"" + i + "\""));
    }
View Full Code Here

    }
  }

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

    assertThat(code, not(containsString("return;")));
  }
View Full Code Here

  }

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

    assertThat(code, containsOne("return new int[]{1, 2, 3, 5}[i];"));
  }
View Full Code Here

    }
  }

  @Test
  public void test() {
    ClassNode cls = getClassNode(TestCls.class);
    String code = cls.getCode().toString();
    assertThat(code, containsString("case CONST_ABC:"));
    assertThat(code, containsString("return CONST_CDE;"));

    cls.addInnerClass(getClassNode(TestCls.Inner.class));
    assertThat(code, containsString("case CONST_CDE_PRIVATE:"));
    assertThat(code, containsString(".CONST_ABC;"));
  }
View Full Code Here

    }
  }

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

    assertThat(code, containsString("public ItemReference(V item, Object id, ReferenceQueue<? super V> queue) {"));
    assertThat(code, containsString("public V get(Object id) {"));
    assertThat(code, containsString("WeakReference<V> ref = "));
    assertThat(code, containsString("return ref != null ? ref.get() : null;"));
View Full Code Here

    }
  }

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

    assertThat(code, not(containsString("return false.length;")));
    assertThat(code, containsOne("int[] a = null;"));
    assertThat(code, containsOne("return a.length;"));
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.