Package jadx.tests.integration.generics

Source Code of jadx.tests.integration.generics.TestGenerics$TestCls$A

package jadx.tests.integration.generics;

import jadx.core.dex.nodes.ClassNode;
import jadx.tests.api.IntegrationTest;

import java.util.List;

import org.junit.Test;

import static org.hamcrest.CoreMatchers.containsString;
import static org.junit.Assert.assertThat;

public class TestGenerics extends IntegrationTest {

  public static class TestCls {
    class A {
    }

    public static void mthWildcard(List<?> list) {
    }

    public static void mthExtends(List<? extends A> list) {
    }

    public static void mthSuper(List<? super A> list) {
    }
  }

  @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)"));
  }
}
TOP

Related Classes of jadx.tests.integration.generics.TestGenerics$TestCls$A

TOP
Copyright © 2018 www.massapi.com. 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.