Package jadx.tests.integration.generics

Source Code of jadx.tests.integration.generics.TestGenerics3$TestCls

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 TestGenerics3 extends IntegrationTest {

  public static class TestCls {

    public static void mthExtendsArray(List<? extends byte[]> list) {
    }

    public static void mthSuperArray(List<? super int[]> list) {
    }

    public static void mthSuperInteger(List<? super Integer> list) {
    }

    public static void mthExtendsString(List<? super String> list) {
    }
  }

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

    assertThat(code, containsString("mthExtendsArray(List<? extends byte[]> list)"));
    assertThat(code, containsString("mthSuperArray(List<? super int[]> list)"));
    assertThat(code, containsString("mthSuperInteger(List<? super Integer> list)"));
    assertThat(code, containsString("mthExtendsString(List<? super String> list)"));
  }
}
TOP

Related Classes of jadx.tests.integration.generics.TestGenerics3$TestCls

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.