< prev index next >

test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodTypeFloat.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 VarHandleTestMethodTypeFloat
   * @run testng/othervm -Djava.lang.invoke.VarHandle.VAR_HANDLE_GUARDS=true -Djava.lang.invoke.VarHandle.VAR_HANDLE_IDENTITY_ADAPT=true VarHandleTestMethodTypeFloat

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

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

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

@@ -755,192 +759,192 @@
                  boolean x = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeFloat.class)).
                      invokeExact(recv);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
-                 float x = (float) hs.get(am, methodType(float.class)).
+                 float x = (float) hs.get(am, methodType(type)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 float x = (float) hs.get(am, methodType(float.class, VarHandleTestMethodTypeFloat.class, Class.class)).
+                 float x = (float) hs.get(am, methodType(type, VarHandleTestMethodTypeFloat.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, VarHandleTestMethodTypeFloat.class, float.class)).
+                 hs.get(am, methodType(void.class, VarHandleTestMethodTypeFloat.class, type)).
                      invokeExact((VarHandleTestMethodTypeFloat) null, 1.0f);
              });
              hs.checkWMTEOrCCE(() -> { // receiver reference class
-                 hs.get(am, methodType(void.class, Class.class, float.class)).
+                 hs.get(am, methodType(void.class, Class.class, type)).
                      invokeExact(Void.class, 1.0f);
              });
              checkWMTE(() -> { // value reference class
                  hs.get(am, methodType(void.class, VarHandleTestMethodTypeFloat.class, Class.class)).
                      invokeExact(recv, Void.class);
              });
              checkWMTE(() -> { // receiver primitive class
-                 hs.get(am, methodType(void.class, int.class, float.class)).
+                 hs.get(am, methodType(void.class, int.class, type)).
                      invokeExact(0, 1.0f);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
                  hs.get(am, methodType(void.class)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 hs.get(am, methodType(void.class, VarHandleTestMethodTypeFloat.class, float.class, Class.class)).
+                 hs.get(am, methodType(void.class, VarHandleTestMethodTypeFloat.class, type, Class.class)).
                      invokeExact(recv, 1.0f, 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, VarHandleTestMethodTypeFloat.class, float.class, float.class)).
+                 boolean r = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeFloat.class, type, type)).
                      invokeExact((VarHandleTestMethodTypeFloat) null, 1.0f, 1.0f);
              });
              hs.checkWMTEOrCCE(() -> { // receiver reference class
-                 boolean r = (boolean) hs.get(am, methodType(boolean.class, Class.class, float.class, float.class)).
+                 boolean r = (boolean) hs.get(am, methodType(boolean.class, Class.class, type, type)).
                      invokeExact(Void.class, 1.0f, 1.0f);
              });
              checkWMTE(() -> { // expected reference class
-                 boolean r = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeFloat.class, Class.class, float.class)).
+                 boolean r = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeFloat.class, Class.class, type)).
                      invokeExact(recv, Void.class, 1.0f);
              });
              checkWMTE(() -> { // actual reference class
-                 boolean r = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeFloat.class, float.class, Class.class)).
+                 boolean r = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeFloat.class, type, Class.class)).
                      invokeExact(recv, 1.0f, Void.class);
              });
              checkWMTE(() -> { // receiver primitive class
-                 boolean r = (boolean) hs.get(am, methodType(boolean.class, int.class , float.class, float.class)).
+                 boolean r = (boolean) hs.get(am, methodType(boolean.class, int.class , type, type)).
                      invokeExact(0, 1.0f, 1.0f);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
                  boolean r = (boolean) hs.get(am, methodType(boolean.class)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 boolean r = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeFloat.class, float.class, float.class, Class.class)).
+                 boolean r = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeFloat.class, type, type, Class.class)).
                      invokeExact(recv, 1.0f, 1.0f, Void.class);
              });
          }
  
          for (TestAccessMode am : testAccessModesOfType(TestAccessType.COMPARE_AND_EXCHANGE)) {
              checkNPE(() -> { // null receiver
-                 float x = (float) hs.get(am, methodType(float.class, VarHandleTestMethodTypeFloat.class, float.class, float.class)).
+                 float x = (float) hs.get(am, methodType(type, VarHandleTestMethodTypeFloat.class, type, type)).
                      invokeExact((VarHandleTestMethodTypeFloat) null, 1.0f, 1.0f);
              });
              hs.checkWMTEOrCCE(() -> { // receiver reference class
-                 float x = (float) hs.get(am, methodType(float.class, Class.class, float.class, float.class)).
+                 float x = (float) hs.get(am, methodType(type, Class.class, type, type)).
                      invokeExact(Void.class, 1.0f, 1.0f);
              });
              checkWMTE(() -> { // expected reference class
-                 float x = (float) hs.get(am, methodType(float.class, VarHandleTestMethodTypeFloat.class, Class.class, float.class)).
+                 float x = (float) hs.get(am, methodType(type, VarHandleTestMethodTypeFloat.class, Class.class, type)).
                      invokeExact(recv, Void.class, 1.0f);
              });
              checkWMTE(() -> { // actual reference class
-                 float x = (float) hs.get(am, methodType(float.class, VarHandleTestMethodTypeFloat.class, float.class, Class.class)).
+                 float x = (float) hs.get(am, methodType(type, VarHandleTestMethodTypeFloat.class, type, Class.class)).
                      invokeExact(recv, 1.0f, Void.class);
              });
              checkWMTE(() -> { // reciever primitive class
-                 float x = (float) hs.get(am, methodType(float.class, int.class , float.class, float.class)).
+                 float x = (float) hs.get(am, methodType(type, int.class , type, type)).
                      invokeExact(0, 1.0f, 1.0f);
              });
              // Incorrect return type
              checkWMTE(() -> { // reference class
-                 Void r = (Void) hs.get(am, methodType(Void.class, VarHandleTestMethodTypeFloat.class , float.class, float.class)).
+                 Void r = (Void) hs.get(am, methodType(Void.class, VarHandleTestMethodTypeFloat.class , type, type)).
                      invokeExact(recv, 1.0f, 1.0f);
              });
              checkWMTE(() -> { // primitive class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeFloat.class , float.class, float.class)).
+                 boolean x = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeFloat.class , type, type)).
                      invokeExact(recv, 1.0f, 1.0f);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
-                 float x = (float) hs.get(am, methodType(float.class)).
+                 float x = (float) hs.get(am, methodType(type)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 float x = (float) hs.get(am, methodType(float.class, VarHandleTestMethodTypeFloat.class, float.class, float.class, Class.class)).
+                 float x = (float) hs.get(am, methodType(type, VarHandleTestMethodTypeFloat.class, type, type, Class.class)).
                      invokeExact(recv, 1.0f, 1.0f, Void.class);
              });
          }
  
          for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_SET)) {
              checkNPE(() -> { // null receiver
-                 float x = (float) hs.get(am, methodType(float.class, VarHandleTestMethodTypeFloat.class, float.class)).
+                 float x = (float) hs.get(am, methodType(type, VarHandleTestMethodTypeFloat.class, type)).
                      invokeExact((VarHandleTestMethodTypeFloat) null, 1.0f);
              });
              hs.checkWMTEOrCCE(() -> { // receiver reference class
-                 float x = (float) hs.get(am, methodType(float.class, Class.class, float.class)).
+                 float x = (float) hs.get(am, methodType(type, Class.class, type)).
                      invokeExact(Void.class, 1.0f);
              });
              checkWMTE(() -> { // value reference class
-                 float x = (float) hs.get(am, methodType(float.class, VarHandleTestMethodTypeFloat.class, Class.class)).
+                 float x = (float) hs.get(am, methodType(type, VarHandleTestMethodTypeFloat.class, Class.class)).
                      invokeExact(recv, Void.class);
              });
              checkWMTE(() -> { // reciever primitive class
-                 float x = (float) hs.get(am, methodType(float.class, int.class, float.class)).
+                 float x = (float) hs.get(am, methodType(type, int.class, type)).
                      invokeExact(0, 1.0f);
              });
              // Incorrect return type
              checkWMTE(() -> { // reference class
-                 Void r = (Void) hs.get(am, methodType(Void.class, VarHandleTestMethodTypeFloat.class, float.class)).
+                 Void r = (Void) hs.get(am, methodType(Void.class, VarHandleTestMethodTypeFloat.class, type)).
                      invokeExact(recv, 1.0f);
              });
              checkWMTE(() -> { // primitive class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeFloat.class, float.class)).
+                 boolean x = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeFloat.class, type)).
                      invokeExact(recv, 1.0f);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
-                 float x = (float) hs.get(am, methodType(float.class)).
+                 float x = (float) hs.get(am, methodType(type)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 float x = (float) hs.get(am, methodType(float.class, VarHandleTestMethodTypeFloat.class, float.class)).
+                 float x = (float) hs.get(am, methodType(type, VarHandleTestMethodTypeFloat.class, type)).
                      invokeExact(recv, 1.0f, Void.class);
              });
          }
  
          for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_ADD)) {
              checkNPE(() -> { // null receiver
-                 float x = (float) hs.get(am, methodType(float.class, VarHandleTestMethodTypeFloat.class, float.class)).
+                 float x = (float) hs.get(am, methodType(type, VarHandleTestMethodTypeFloat.class, type)).
                      invokeExact((VarHandleTestMethodTypeFloat) null, 1.0f);
              });
              hs.checkWMTEOrCCE(() -> { // receiver reference class
-                 float x = (float) hs.get(am, methodType(float.class, Class.class, float.class)).
+                 float x = (float) hs.get(am, methodType(type, Class.class, type)).
                      invokeExact(Void.class, 1.0f);
              });
              checkWMTE(() -> { // value reference class
-                 float x = (float) hs.get(am, methodType(float.class, VarHandleTestMethodTypeFloat.class, Class.class)).
+                 float x = (float) hs.get(am, methodType(type, VarHandleTestMethodTypeFloat.class, Class.class)).
                      invokeExact(recv, Void.class);
              });
              checkWMTE(() -> { // reciever primitive class
-                 float x = (float) hs.get(am, methodType(float.class, int.class, float.class)).
+                 float x = (float) hs.get(am, methodType(type, int.class, type)).
                      invokeExact(0, 1.0f);
              });
              // Incorrect return type
              checkWMTE(() -> { // reference class
-                 Void r = (Void) hs.get(am, methodType(Void.class, VarHandleTestMethodTypeFloat.class, float.class)).
+                 Void r = (Void) hs.get(am, methodType(Void.class, VarHandleTestMethodTypeFloat.class, type)).
                      invokeExact(recv, 1.0f);
              });
              checkWMTE(() -> { // primitive class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeFloat.class, float.class)).
+                 boolean x = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeFloat.class, type)).
                      invokeExact(recv, 1.0f);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
-                 float x = (float) hs.get(am, methodType(float.class)).
+                 float x = (float) hs.get(am, methodType(type)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 float x = (float) hs.get(am, methodType(float.class, VarHandleTestMethodTypeFloat.class, float.class)).
+                 float x = (float) hs.get(am, methodType(type, VarHandleTestMethodTypeFloat.class, type)).
                      invokeExact(recv, 1.0f, Void.class);
              });
          }
  
      }

@@ -1368,113 +1372,113 @@
              checkWMTE(() -> { // 0
                  hs.get(am, methodType(void.class)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 hs.get(am, methodType(void.class, float.class, Class.class)).
+                 hs.get(am, methodType(void.class, type, Class.class)).
                      invokeExact(1.0f, 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, float.class)).
+                 boolean r = (boolean) hs.get(am, methodType(boolean.class, Class.class, type)).
                      invokeExact(Void.class, 1.0f);
              });
              checkWMTE(() -> { // actual reference class
-                 boolean r = (boolean) hs.get(am, methodType(boolean.class, float.class, Class.class)).
+                 boolean r = (boolean) hs.get(am, methodType(boolean.class, type, Class.class)).
                      invokeExact(1.0f, 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, float.class, float.class, Class.class)).
+                 boolean r = (boolean) hs.get(am, methodType(boolean.class, type, type, Class.class)).
                      invokeExact(1.0f, 1.0f, Void.class);
              });
          }
  
          for (TestAccessMode am : testAccessModesOfType(TestAccessType.COMPARE_AND_EXCHANGE)) {
              // Incorrect argument types
              checkWMTE(() -> { // expected reference class
-                 float x = (float) hs.get(am, methodType(float.class, Class.class, float.class)).
+                 float x = (float) hs.get(am, methodType(type, Class.class, type)).
                      invokeExact(Void.class, 1.0f);
              });
              checkWMTE(() -> { // actual reference class
-                 float x = (float) hs.get(am, methodType(float.class, float.class, Class.class)).
+                 float x = (float) hs.get(am, methodType(type, type, Class.class)).
                      invokeExact(1.0f, Void.class);
              });
              // Incorrect return type
              checkWMTE(() -> { // reference class
-                 Void r = (Void) hs.get(am, methodType(Void.class, float.class, float.class)).
+                 Void r = (Void) hs.get(am, methodType(Void.class, type, type)).
                      invokeExact(1.0f, 1.0f);
              });
              checkWMTE(() -> { // primitive class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, float.class, float.class)).
+                 boolean x = (boolean) hs.get(am, methodType(boolean.class, type, type)).
                      invokeExact(1.0f, 1.0f);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
-                 float x = (float) hs.get(am, methodType(float.class)).
+                 float x = (float) hs.get(am, methodType(type)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 float x = (float) hs.get(am, methodType(float.class, float.class, float.class, Class.class)).
+                 float x = (float) hs.get(am, methodType(type, type, type, Class.class)).
                      invokeExact(1.0f, 1.0f, Void.class);
              });
          }
  
          for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_SET)) {
              // Incorrect argument types
              checkWMTE(() -> { // value reference class
-                 float x = (float) hs.get(am, methodType(float.class, Class.class)).
+                 float x = (float) 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, float.class)).
+                 Void r = (Void) hs.get(am, methodType(Void.class, type)).
                      invokeExact(1.0f);
              });
              checkWMTE(() -> { // primitive class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, float.class)).
+                 boolean x = (boolean) hs.get(am, methodType(boolean.class, type)).
                      invokeExact(1.0f);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
-                 float x = (float) hs.get(am, methodType(float.class)).
+                 float x = (float) hs.get(am, methodType(type)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 float x = (float) hs.get(am, methodType(float.class, float.class, Class.class)).
+                 float x = (float) hs.get(am, methodType(type, type, Class.class)).
                      invokeExact(1.0f, Void.class);
              });
          }
  
          for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_ADD)) {
              // Incorrect argument types
              checkWMTE(() -> { // value reference class
-                 float x = (float) hs.get(am, methodType(float.class, Class.class)).
+                 float x = (float) 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, float.class)).
+                 Void r = (Void) hs.get(am, methodType(Void.class, type)).
                      invokeExact(1.0f);
              });
              checkWMTE(() -> { // primitive class
-                 boolean x = (boolean) hs.get(am, methodType(boolean.class, float.class)).
+                 boolean x = (boolean) hs.get(am, methodType(boolean.class, type)).
                      invokeExact(1.0f);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
-                 float x = (float) hs.get(am, methodType(float.class)).
+                 float x = (float) hs.get(am, methodType(type)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 float x = (float) hs.get(am, methodType(float.class, float.class, Class.class)).
+                 float x = (float) hs.get(am, methodType(type, type, Class.class)).
                      invokeExact(1.0f, Void.class);
              });
          }
  
      }

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

@@ -2190,39 +2194,39 @@
                  boolean x = (boolean) hs.get(am, methodType(boolean.class, float[].class, int.class)).
                      invokeExact(array, 0);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
-                 float x = (float) hs.get(am, methodType(float.class)).
+                 float x = (float) hs.get(am, methodType(type)).
                      invokeExact();
              });
              checkWMTE(() -> { // >
-                 float x = (float) hs.get(am, methodType(float.class, float[].class, int.class, Class.class)).
+                 float x = (float) hs.get(am, methodType(type, float[].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, float[].class, int.class, float.class)).
+                 hs.get(am, methodType(void.class, float[].class, int.class, type)).
                      invokeExact((float[]) null, 0, 1.0f);
              });
              hs.checkWMTEOrCCE(() -> { // array reference class
-                 hs.get(am, methodType(void.class, Class.class, int.class, float.class)).
+                 hs.get(am, methodType(void.class, Class.class, int.class, type)).
                      invokeExact(Void.class, 0, 1.0f);
              });
              checkWMTE(() -> { // value reference class
                  hs.get(am, methodType(void.class, float[].class, int.class, Class.class)).
                      invokeExact(array, 0, Void.class);
              });
              checkWMTE(() -> { // receiver primitive class
-                 hs.get(am, methodType(void.class, int.class, int.class, float.class)).
+                 hs.get(am, methodType(void.class, int.class, int.class, type)).
                      invokeExact(0, 0, 1.0f);
              });
              checkWMTE(() -> { // index reference class
-                 hs.get(am, methodType(void.class, float[].class, Class.class, float.class)).
+                 hs.get(am, methodType(void.class, float[].class, Class.class, type)).
                      invokeExact(array, Void.class, 1.0f);
              });
              // Incorrect arity
              checkWMTE(() -> { // 0
                  hs.get(am, methodType(void.class)).

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