< prev index next >

test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodTypeBoolean.java

Print this page
@@ -19,10 +19,12 @@
   * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   * or visit www.oracle.com if you need additional information or have any
   * questions.
   */
  
+ // -- This file was mechanically generated: Do not edit! -- //
+ 
  /*
   * @test
   * @bug 8156486
   * @run testng/othervm VarHandleTestMethodTypeBoolean
   * @run testng/othervm -Djava.lang.invoke.VarHandle.VAR_HANDLE_GUARDS=true -Djava.lang.invoke.VarHandle.VAR_HANDLE_IDENTITY_ADAPT=true VarHandleTestMethodTypeBoolean

@@ -43,10 +45,12 @@
  import static org.testng.Assert.*;
  
  import static java.lang.invoke.MethodType.*;
  
  public class VarHandleTestMethodTypeBoolean extends VarHandleBaseTest {
+     static final Class<?> type = boolean.class;
+ 
      static final boolean static_final_v = true;
  
      static boolean static_v = true;
  
      final boolean final_v = true;

@@ -64,20 +68,20 @@
      VarHandle vhArray;
  
      @BeforeClass
      public void setup() throws Exception {
          vhFinalField = MethodHandles.lookup().findVarHandle(
-                 VarHandleTestMethodTypeBoolean.class, "final_v", boolean.class);
+                 VarHandleTestMethodTypeBoolean.class, "final_v", type);
  
          vhField = MethodHandles.lookup().findVarHandle(
-                 VarHandleTestMethodTypeBoolean.class, "v", boolean.class);
+                 VarHandleTestMethodTypeBoolean.class, "v", type);
  
          vhStaticFinalField = MethodHandles.lookup().findStaticVarHandle(
-             VarHandleTestMethodTypeBoolean.class, "static_final_v", boolean.class);
+             VarHandleTestMethodTypeBoolean.class, "static_final_v", type);
  
          vhStaticField = MethodHandles.lookup().findStaticVarHandle(
-             VarHandleTestMethodTypeBoolean.class, "static_v", boolean.class);
+             VarHandleTestMethodTypeBoolean.class, "static_v", type);
  
          vhArray = MethodHandles.arrayElementVarHandle(boolean[].class);
      }
  
      @DataProvider

@@ -915,19 +919,19 @@
  
      static void testInstanceFieldWrongMethodType(VarHandleTestMethodTypeBoolean recv, Handles hs) throws Throwable {
          for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET)) {
              // Incorrect argument types
              checkNPE(() -> { // null receiver
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeBoolean.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, VarHandleTestMethodTypeBoolean.class)).
                      invokeExact((VarHandleTestMethodTypeBoolean) null);
              });
              hs.checkWMTEOrCCE(() -> { // receiver reference class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, Class.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, Class.class)).
                      invokeExact(Void.class);
              });
              checkWMTE(() -> { // receiver primitive class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, int.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, int.class)).
                      invokeExact(0);
              });
              // Incorrect return type
              checkWMTE(() -> { // reference class
                  Void x = (Void) hs.get(am, methodType(Void.class, VarHandleTestMethodTypeBoolean.class)).

@@ -937,193 +941,193 @@
                  int x = (int) hs.get(am, methodType(int.class, VarHandleTestMethodTypeBoolean.class)).
                      invokeExact(recv);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeBoolean.class, Class.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, VarHandleTestMethodTypeBoolean.class, Class.class)).
                      invokeExact(recv, Void.class);
              });
          }
  
          for (TestAccessMode am : testAccessModesOfType(TestAccessType.SET)) {
              // Incorrect argument types
              checkNPE(() -> { // null receiver
-                 hs.get(am, methodType(void.class, VarHandleTestMethodTypeBoolean.class, boolean.class)).
+                 hs.get(am, methodType(void.class, VarHandleTestMethodTypeBoolean.class, type)).
                      invokeExact((VarHandleTestMethodTypeBoolean) null, true);
              });
              hs.checkWMTEOrCCE(() -> { // receiver reference class
-                 hs.get(am, methodType(void.class, Class.class, boolean.class)).
+                 hs.get(am, methodType(void.class, Class.class, type)).
                      invokeExact(Void.class, true);
              });
              checkWMTE(() -> { // value reference class
                  hs.get(am, methodType(void.class, VarHandleTestMethodTypeBoolean.class, Class.class)).
                      invokeExact(recv, Void.class);
              });
              checkWMTE(() -> { // receiver primitive class
-                 hs.get(am, methodType(void.class, int.class, boolean.class)).
+                 hs.get(am, methodType(void.class, int.class, type)).
                      invokeExact(0, true);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
                  hs.get(am, methodType(void.class)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 hs.get(am, methodType(void.class, VarHandleTestMethodTypeBoolean.class, boolean.class, Class.class)).
+                 hs.get(am, methodType(void.class, VarHandleTestMethodTypeBoolean.class, type, Class.class)).
                      invokeExact(recv, true, Void.class);
              });
          }
  
          for (TestAccessMode am : testAccessModesOfType(TestAccessType.COMPARE_AND_SET)) {
              // Incorrect argument types
              checkNPE(() -> { // null receiver
-                 boolean r = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeBoolean.class, boolean.class, boolean.class)).
+                 boolean r = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeBoolean.class, type, type)).
                      invokeExact((VarHandleTestMethodTypeBoolean) null, true, true);
              });
              hs.checkWMTEOrCCE(() -> { // receiver reference class
-                 boolean r = (boolean) hs.get(am, methodType(boolean.class, Class.class, boolean.class, boolean.class)).
+                 boolean r = (boolean) hs.get(am, methodType(boolean.class, Class.class, type, type)).
                      invokeExact(Void.class, true, true);
              });
              checkWMTE(() -> { // expected reference class
-                 boolean r = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeBoolean.class, Class.class, boolean.class)).
+                 boolean r = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeBoolean.class, Class.class, type)).
                      invokeExact(recv, Void.class, true);
              });
              checkWMTE(() -> { // actual reference class
-                 boolean r = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeBoolean.class, boolean.class, Class.class)).
+                 boolean r = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeBoolean.class, type, Class.class)).
                      invokeExact(recv, true, Void.class);
              });
              checkWMTE(() -> { // receiver primitive class
-                 boolean r = (boolean) hs.get(am, methodType(boolean.class, int.class , boolean.class, boolean.class)).
+                 boolean r = (boolean) hs.get(am, methodType(boolean.class, int.class , type, type)).
                      invokeExact(0, true, true);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
                  boolean r = (boolean) hs.get(am, methodType(boolean.class)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 boolean r = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeBoolean.class, boolean.class, boolean.class, Class.class)).
+                 boolean r = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeBoolean.class, type, type, Class.class)).
                      invokeExact(recv, true, true, Void.class);
              });
          }
  
          for (TestAccessMode am : testAccessModesOfType(TestAccessType.COMPARE_AND_EXCHANGE)) {
              checkNPE(() -> { // null receiver
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeBoolean.class, boolean.class, boolean.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, VarHandleTestMethodTypeBoolean.class, type, type)).
                      invokeExact((VarHandleTestMethodTypeBoolean) null, true, true);
              });
              hs.checkWMTEOrCCE(() -> { // receiver reference class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, Class.class, boolean.class, boolean.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, Class.class, type, type)).
                      invokeExact(Void.class, true, true);
              });
              checkWMTE(() -> { // expected reference class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeBoolean.class, Class.class, boolean.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, VarHandleTestMethodTypeBoolean.class, Class.class, type)).
                      invokeExact(recv, Void.class, true);
              });
              checkWMTE(() -> { // actual reference class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeBoolean.class, boolean.class, Class.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, VarHandleTestMethodTypeBoolean.class, type, Class.class)).
                      invokeExact(recv, true, Void.class);
              });
              checkWMTE(() -> { // reciever primitive class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, int.class , boolean.class, boolean.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, int.class , type, type)).
                      invokeExact(0, true, true);
              });
              // Incorrect return type
              checkWMTE(() -> { // reference class
-                 Void r = (Void) hs.get(am, methodType(Void.class, VarHandleTestMethodTypeBoolean.class , boolean.class, boolean.class)).
+                 Void r = (Void) hs.get(am, methodType(Void.class, VarHandleTestMethodTypeBoolean.class , type, type)).
                      invokeExact(recv, true, true);
              });
              checkWMTE(() -> { // primitive class
-                 int x = (int) hs.get(am, methodType(int.class, VarHandleTestMethodTypeBoolean.class , boolean.class, boolean.class)).
+                 int x = (int) hs.get(am, methodType(int.class, VarHandleTestMethodTypeBoolean.class , type, type)).
                      invokeExact(recv, true, true);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeBoolean.class, boolean.class, boolean.class, Class.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, VarHandleTestMethodTypeBoolean.class, type, type, Class.class)).
                      invokeExact(recv, true, true, Void.class);
              });
          }
  
          for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_SET)) {
              checkNPE(() -> { // null receiver
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeBoolean.class, boolean.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, VarHandleTestMethodTypeBoolean.class, type)).
                      invokeExact((VarHandleTestMethodTypeBoolean) null, true);
              });
              hs.checkWMTEOrCCE(() -> { // receiver reference class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, Class.class, boolean.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, Class.class, type)).
                      invokeExact(Void.class, true);
              });
              checkWMTE(() -> { // value reference class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeBoolean.class, Class.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, VarHandleTestMethodTypeBoolean.class, Class.class)).
                      invokeExact(recv, Void.class);
              });
              checkWMTE(() -> { // reciever primitive class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, int.class, boolean.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, int.class, type)).
                      invokeExact(0, true);
              });
              // Incorrect return type
              checkWMTE(() -> { // reference class
-                 Void r = (Void) hs.get(am, methodType(Void.class, VarHandleTestMethodTypeBoolean.class, boolean.class)).
+                 Void r = (Void) hs.get(am, methodType(Void.class, VarHandleTestMethodTypeBoolean.class, type)).
                      invokeExact(recv, true);
              });
              checkWMTE(() -> { // primitive class
-                 int x = (int) hs.get(am, methodType(int.class, VarHandleTestMethodTypeBoolean.class, boolean.class)).
+                 int x = (int) hs.get(am, methodType(int.class, VarHandleTestMethodTypeBoolean.class, type)).
                      invokeExact(recv, true);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeBoolean.class, boolean.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, VarHandleTestMethodTypeBoolean.class, type)).
                      invokeExact(recv, true, Void.class);
              });
          }
  
  
          for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
              checkNPE(() -> { // null receiver
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeBoolean.class, boolean.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, VarHandleTestMethodTypeBoolean.class, type)).
                      invokeExact((VarHandleTestMethodTypeBoolean) null, true);
              });
              hs.checkWMTEOrCCE(() -> { // receiver reference class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, Class.class, boolean.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, Class.class, type)).
                      invokeExact(Void.class, true);
              });
              checkWMTE(() -> { // value reference class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeBoolean.class, Class.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, VarHandleTestMethodTypeBoolean.class, Class.class)).
                      invokeExact(recv, Void.class);
              });
              checkWMTE(() -> { // reciever primitive class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, int.class, boolean.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, int.class, type)).
                      invokeExact(0, true);
              });
              // Incorrect return type
              checkWMTE(() -> { // reference class
-                 Void r = (Void) hs.get(am, methodType(Void.class, VarHandleTestMethodTypeBoolean.class, boolean.class)).
+                 Void r = (Void) hs.get(am, methodType(Void.class, VarHandleTestMethodTypeBoolean.class, type)).
                      invokeExact(recv, true);
              });
              checkWMTE(() -> { // primitive class
-                 int x = (int) hs.get(am, methodType(int.class, VarHandleTestMethodTypeBoolean.class, boolean.class)).
+                 int x = (int) hs.get(am, methodType(int.class, VarHandleTestMethodTypeBoolean.class, type)).
                      invokeExact(recv, true);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeBoolean.class, boolean.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, VarHandleTestMethodTypeBoolean.class, type)).
                      invokeExact(recv, true, Void.class);
              });
          }
      }
  

@@ -1676,114 +1680,114 @@
              checkWMTE(() -> { // 0
                  hs.get(am, methodType(void.class)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 hs.get(am, methodType(void.class, boolean.class, Class.class)).
+                 hs.get(am, methodType(void.class, type, Class.class)).
                      invokeExact(true, Void.class);
              });
          }
          for (TestAccessMode am : testAccessModesOfType(TestAccessType.COMPARE_AND_SET)) {
              // Incorrect argument types
              checkWMTE(() -> { // expected reference class
-                 boolean r = (boolean) hs.get(am, methodType(boolean.class, Class.class, boolean.class)).
+                 boolean r = (boolean) hs.get(am, methodType(boolean.class, Class.class, type)).
                      invokeExact(Void.class, true);
              });
              checkWMTE(() -> { // actual reference class
-                 boolean r = (boolean) hs.get(am, methodType(boolean.class, boolean.class, Class.class)).
+                 boolean r = (boolean) hs.get(am, methodType(boolean.class, type, Class.class)).
                      invokeExact(true, Void.class);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
                  boolean r = (boolean) hs.get(am, methodType(boolean.class)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 boolean r = (boolean) hs.get(am, methodType(boolean.class, boolean.class, boolean.class, Class.class)).
+                 boolean r = (boolean) hs.get(am, methodType(boolean.class, type, type, Class.class)).
                      invokeExact(true, true, Void.class);
              });
          }
  
          for (TestAccessMode am : testAccessModesOfType(TestAccessType.COMPARE_AND_EXCHANGE)) {
              // Incorrect argument types
              checkWMTE(() -> { // expected reference class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, Class.class, boolean.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, Class.class, type)).
                      invokeExact(Void.class, true);
              });
              checkWMTE(() -> { // actual reference class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, boolean.class, Class.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, type, Class.class)).
                      invokeExact(true, Void.class);
              });
              // Incorrect return type
              checkWMTE(() -> { // reference class
-                 Void r = (Void) hs.get(am, methodType(Void.class, boolean.class, boolean.class)).
+                 Void r = (Void) hs.get(am, methodType(Void.class, type, type)).
                      invokeExact(true, true);
              });
              checkWMTE(() -> { // primitive class
-                 int x = (int) hs.get(am, methodType(int.class, boolean.class, boolean.class)).
+                 int x = (int) hs.get(am, methodType(int.class, type, type)).
                      invokeExact(true, true);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, boolean.class, boolean.class, Class.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, type, type, Class.class)).
                      invokeExact(true, true, Void.class);
              });
          }
  
          for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_SET)) {
              // Incorrect argument types
              checkWMTE(() -> { // value reference class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, Class.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, Class.class)).
                      invokeExact(Void.class);
              });
              // Incorrect return type
              checkWMTE(() -> { // reference class
-                 Void r = (Void) hs.get(am, methodType(Void.class, boolean.class)).
+                 Void r = (Void) hs.get(am, methodType(Void.class, type)).
                      invokeExact(true);
              });
              checkWMTE(() -> { // primitive class
-                 int x = (int) hs.get(am, methodType(int.class, boolean.class)).
+                 int x = (int) hs.get(am, methodType(int.class, type)).
                      invokeExact(true);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, boolean.class, Class.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, type, Class.class)).
                      invokeExact(true, Void.class);
              });
          }
  
  
          for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
              // Incorrect argument types
              checkWMTE(() -> { // value reference class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, Class.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, Class.class)).
                      invokeExact(Void.class);
              });
              // Incorrect return type
              checkWMTE(() -> { // reference class
-                 Void r = (Void) hs.get(am, methodType(Void.class, boolean.class)).
+                 Void r = (Void) hs.get(am, methodType(Void.class, type)).
                      invokeExact(true);
              });
              checkWMTE(() -> { // primitive class
-                 int x = (int) hs.get(am, methodType(int.class, boolean.class)).
+                 int x = (int) hs.get(am, methodType(int.class, type)).
                      invokeExact(true);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, boolean.class, Class.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, type, Class.class)).
                      invokeExact(true, Void.class);
              });
          }
      }
  

@@ -2670,23 +2674,23 @@
          Arrays.fill(array, true);
  
          for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET)) {
              // Incorrect argument types
              checkNPE(() -> { // null array
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, boolean[].class, int.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, boolean[].class, int.class)).
                      invokeExact((boolean[]) null, 0);
              });
              hs.checkWMTEOrCCE(() -> { // array reference class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, Class.class, int.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, Class.class, int.class)).
                      invokeExact(Void.class, 0);
              });
              checkWMTE(() -> { // array primitive class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, int.class, int.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, int.class, int.class)).
                      invokeExact(0, 0);
              });
              checkWMTE(() -> { // index reference class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, boolean[].class, Class.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, boolean[].class, Class.class)).
                      invokeExact(array, Void.class);
              });
              // Incorrect return type
              checkWMTE(() -> { // reference class
                  Void x = (Void) hs.get(am, methodType(Void.class, boolean[].class, int.class)).

@@ -2696,39 +2700,39 @@
                  int x = (int) hs.get(am, methodType(int.class, boolean[].class, int.class)).
                      invokeExact(array, 0);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, boolean[].class, int.class, Class.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, boolean[].class, int.class, Class.class)).
                      invokeExact(array, 0, Void.class);
              });
          }
  
          for (TestAccessMode am : testAccessModesOfType(TestAccessType.SET)) {
              // Incorrect argument types
              checkNPE(() -> { // null array
-                 hs.get(am, methodType(void.class, boolean[].class, int.class, boolean.class)).
+                 hs.get(am, methodType(void.class, boolean[].class, int.class, type)).
                      invokeExact((boolean[]) null, 0, true);
              });
              hs.checkWMTEOrCCE(() -> { // array reference class
-                 hs.get(am, methodType(void.class, Class.class, int.class, boolean.class)).
+                 hs.get(am, methodType(void.class, Class.class, int.class, type)).
                      invokeExact(Void.class, 0, true);
              });
              checkWMTE(() -> { // value reference class
                  hs.get(am, methodType(void.class, boolean[].class, int.class, Class.class)).
                      invokeExact(array, 0, Void.class);
              });
              checkWMTE(() -> { // receiver primitive class
-                 hs.get(am, methodType(void.class, int.class, int.class, boolean.class)).
+                 hs.get(am, methodType(void.class, int.class, int.class, type)).
                      invokeExact(0, 0, true);
              });
              checkWMTE(() -> { // index reference class
-                 hs.get(am, methodType(void.class, boolean[].class, Class.class, boolean.class)).
+                 hs.get(am, methodType(void.class, boolean[].class, Class.class, type)).
                      invokeExact(array, Void.class, true);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
                  hs.get(am, methodType(void.class)).

@@ -2740,171 +2744,171 @@
              });
          }
          for (TestAccessMode am : testAccessModesOfType(TestAccessType.COMPARE_AND_SET)) {
              // Incorrect argument types
              checkNPE(() -> { // null receiver
-                 boolean r = (boolean) hs.get(am, methodType(boolean.class, boolean[].class, int.class, boolean.class, boolean.class)).
+                 boolean r = (boolean) hs.get(am, methodType(boolean.class, boolean[].class, int.class, type, type)).
                      invokeExact((boolean[]) null, 0, true, true);
              });
              hs.checkWMTEOrCCE(() -> { // receiver reference class
-                 boolean r = (boolean) hs.get(am, methodType(boolean.class, Class.class, int.class, boolean.class, boolean.class)).
+                 boolean r = (boolean) hs.get(am, methodType(boolean.class, Class.class, int.class, type, type)).
                      invokeExact(Void.class, 0, true, true);
              });
              checkWMTE(() -> { // expected reference class
-                 boolean r = (boolean) hs.get(am, methodType(boolean.class, boolean[].class, int.class, Class.class, boolean.class)).
+                 boolean r = (boolean) hs.get(am, methodType(boolean.class, boolean[].class, int.class, Class.class, type)).
                      invokeExact(array, 0, Void.class, true);
              });
              checkWMTE(() -> { // actual reference class
-                 boolean r = (boolean) hs.get(am, methodType(boolean.class, boolean[].class, int.class, boolean.class, Class.class)).
+                 boolean r = (boolean) hs.get(am, methodType(boolean.class, boolean[].class, int.class, type, Class.class)).
                      invokeExact(array, 0, true, Void.class);
              });
              checkWMTE(() -> { // receiver primitive class
-                 boolean r = (boolean) hs.get(am, methodType(boolean.class, int.class, int.class, boolean.class, boolean.class)).
+                 boolean r = (boolean) hs.get(am, methodType(boolean.class, int.class, int.class, type, type)).
                      invokeExact(0, 0, true, true);
              });
              checkWMTE(() -> { // index reference class
-                 boolean r = (boolean) hs.get(am, methodType(boolean.class, boolean[].class, Class.class, boolean.class, boolean.class)).
+                 boolean r = (boolean) hs.get(am, methodType(boolean.class, boolean[].class, Class.class, type, type)).
                      invokeExact(array, Void.class, true, true);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
                  boolean r = (boolean) hs.get(am, methodType(boolean.class)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 boolean r = (boolean) hs.get(am, methodType(boolean.class, boolean[].class, int.class, boolean.class, boolean.class, Class.class)).
+                 boolean r = (boolean) hs.get(am, methodType(boolean.class, boolean[].class, int.class, type, type, Class.class)).
                      invokeExact(array, 0, true, true, Void.class);
              });
          }
  
          for (TestAccessMode am : testAccessModesOfType(TestAccessType.COMPARE_AND_EXCHANGE)) {
              // Incorrect argument types
              checkNPE(() -> { // null receiver
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, boolean[].class, int.class, boolean.class, boolean.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, boolean[].class, int.class, type, type)).
                      invokeExact((boolean[]) null, 0, true, true);
              });
              hs.checkWMTEOrCCE(() -> { // array reference class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, Class.class, int.class, boolean.class, boolean.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, Class.class, int.class, type, type)).
                      invokeExact(Void.class, 0, true, true);
              });
              checkWMTE(() -> { // expected reference class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, boolean[].class, int.class, Class.class, boolean.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, boolean[].class, int.class, Class.class, type)).
                      invokeExact(array, 0, Void.class, true);
              });
              checkWMTE(() -> { // actual reference class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, boolean[].class, int.class, boolean.class, Class.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, boolean[].class, int.class, type, Class.class)).
                      invokeExact(array, 0, true, Void.class);
              });
              checkWMTE(() -> { // array primitive class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, int.class, int.class, boolean.class, boolean.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, int.class, int.class, type, type)).
                      invokeExact(0, 0, true, true);
              });
              checkWMTE(() -> { // index reference class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, boolean[].class, Class.class, boolean.class, boolean.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, boolean[].class, Class.class, type, type)).
                      invokeExact(array, Void.class, true, true);
              });
              // Incorrect return type
              checkWMTE(() -> { // reference class
-                 Void r = (Void) hs.get(am, methodType(Void.class, boolean[].class, int.class, boolean.class, boolean.class)).
+                 Void r = (Void) hs.get(am, methodType(Void.class, boolean[].class, int.class, type, type)).
                      invokeExact(array, 0, true, true);
              });
              checkWMTE(() -> { // primitive class
-                 int x = (int) hs.get(am, methodType(int.class, boolean[].class, int.class, boolean.class, boolean.class)).
+                 int x = (int) hs.get(am, methodType(int.class, boolean[].class, int.class, type, type)).
                      invokeExact(array, 0, true, true);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, boolean[].class, int.class, boolean.class, boolean.class, Class.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, boolean[].class, int.class, type, type, Class.class)).
                      invokeExact(array, 0, true, true, Void.class);
              });
          }
  
          for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_SET)) {
              // Incorrect argument types
              checkNPE(() -> { // null array
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, boolean[].class, int.class, boolean.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, boolean[].class, int.class, type)).
                      invokeExact((boolean[]) null, 0, true);
              });
              hs.checkWMTEOrCCE(() -> { // array reference class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, Class.class, int.class, boolean.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, Class.class, int.class, type)).
                      invokeExact(Void.class, 0, true);
              });
              checkWMTE(() -> { // value reference class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, boolean[].class, int.class, Class.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, boolean[].class, int.class, Class.class)).
                      invokeExact(array, 0, Void.class);
              });
              checkWMTE(() -> { // array primitive class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, int.class, int.class, boolean.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, int.class, int.class, type)).
                      invokeExact(0, 0, true);
              });
              checkWMTE(() -> { // index reference class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, boolean[].class, Class.class, boolean.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, boolean[].class, Class.class, type)).
                      invokeExact(array, Void.class, true);
              });
              // Incorrect return type
              checkWMTE(() -> { // reference class
-                 Void r = (Void) hs.get(am, methodType(Void.class, boolean[].class, int.class, boolean.class)).
+                 Void r = (Void) hs.get(am, methodType(Void.class, boolean[].class, int.class, type)).
                      invokeExact(array, 0, true);
              });
              checkWMTE(() -> { // primitive class
-                 int x = (int) hs.get(am, methodType(int.class, boolean[].class, int.class, boolean.class)).
+                 int x = (int) hs.get(am, methodType(int.class, boolean[].class, int.class, type)).
                      invokeExact(array, 0, true);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, boolean[].class, int.class, boolean.class, Class.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, boolean[].class, int.class, type, Class.class)).
                      invokeExact(array, 0, true, Void.class);
              });
          }
  
  
          for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
              // Incorrect argument types
              checkNPE(() -> { // null array
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, boolean[].class, int.class, boolean.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, boolean[].class, int.class, type)).
                      invokeExact((boolean[]) null, 0, true);
              });
              hs.checkWMTEOrCCE(() -> { // array reference class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, Class.class, int.class, boolean.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, Class.class, int.class, type)).
                      invokeExact(Void.class, 0, true);
              });
              checkWMTE(() -> { // value reference class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, boolean[].class, int.class, Class.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, boolean[].class, int.class, Class.class)).
                      invokeExact(array, 0, Void.class);
              });
              checkWMTE(() -> { // array primitive class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, int.class, int.class, boolean.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, int.class, int.class, type)).
                      invokeExact(0, 0, true);
              });
              checkWMTE(() -> { // index reference class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, boolean[].class, Class.class, boolean.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, boolean[].class, Class.class, type)).
                      invokeExact(array, Void.class, true);
              });
              // Incorrect return type
              checkWMTE(() -> { // reference class
-                 Void r = (Void) hs.get(am, methodType(Void.class, boolean[].class, int.class, boolean.class)).
+                 Void r = (Void) hs.get(am, methodType(Void.class, boolean[].class, int.class, type)).
                      invokeExact(array, 0, true);
              });
              checkWMTE(() -> { // primitive class
-                 int x = (int) hs.get(am, methodType(int.class, boolean[].class, int.class, boolean.class)).
+                 int x = (int) hs.get(am, methodType(int.class, boolean[].class, int.class, type)).
                      invokeExact(array, 0, true);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, boolean[].class, int.class, boolean.class, Class.class)).
+                 boolean x = (boolean) hs.get(am, methodType(type, boolean[].class, int.class, type, Class.class)).
                      invokeExact(array, 0, true, Void.class);
              });
          }
      }
  }
< prev index next >