Lines Matching refs:mh
288 MethodHandle mh = BarImpl.lookup.findVirtual( in testfindVirtual() local
290 String str = (String) mh.invoke(new BarImpl()); in testfindVirtual()
297 mh = MethodHandles.lookup().findVirtual(BarImpl.class, "foo", in testfindVirtual()
299 str = (String) mh.invoke(new BarImpl()); in testfindVirtual()
306 mh = MethodHandles.lookup().findVirtual(BarImpl.class, "foo", in testfindVirtual()
312 mh = MethodHandles.lookup().findVirtual( in testfindVirtual()
315 mh = MethodHandles.lookup().findVirtual( in testfindVirtual()
320 mh = MethodHandles.lookup().findVirtual(BarImpl.class, "bar", in testfindVirtual()
322 str = (String) mh.invoke(new BarImpl()); in testfindVirtual()
327 mh = MethodHandles.lookup().findVirtual(Bar.class, "bar", in testfindVirtual()
329 str = (String) mh.invoke(new BarImpl()); in testfindVirtual()
334 mh = MethodHandles.lookup().findVirtual(BarAbstractSuper.class, "abstractSuperPublicMethod", in testfindVirtual()
336 str = (String) mh.invoke(new BarImpl()); in testfindVirtual()
343 mh = MethodHandles.lookup().findVirtual(BarImpl.class, "superPublicMethod", in testfindVirtual()
345 str = (String) mh.invoke(new BarImpl()); in testfindVirtual()
350 mh = MethodHandles.lookup().findVirtual(BarImpl.class, "superProtectedMethod", in testfindVirtual()
352 str = (String) mh.invoke(new BarImpl()); in testfindVirtual()
357 mh = MethodHandles.lookup().findVirtual(BarImpl.class, "superPackageMethod", in testfindVirtual()
359 str = (String) mh.invoke(new BarImpl()); in testfindVirtual()
439 MethodHandle mh = MethodHandles.lookup().unreflect(publicMethod); in testUnreflects() local
440 assertEquals("publicMethod", (String) mh.invoke(instance)); in testUnreflects()
441 assertEquals("publicMethod", (String) mh.invokeExact(instance)); in testUnreflects()
444 mh = MethodHandles.lookup().unreflect(publicStaticMethod); in testUnreflects()
445 assertEquals("publicStaticMethod", (String) mh.invoke()); in testUnreflects()
446 assertEquals("publicStaticMethod", (String) mh.invokeExact()); in testUnreflects()
450 mh = MethodHandles.lookup().unreflect(privateMethod); in testUnreflects()
455 mh = MethodHandles.lookup().unreflect(privateMethod); in testUnreflects()
456 assertEquals("privateMethod", (String) mh.invoke(instance)); in testUnreflects()
457 assertEquals("privateMethod", (String) mh.invokeExact(instance)); in testUnreflects()
461 mh = MethodHandles.lookup().unreflect(privateStaticMethod); in testUnreflects()
466 mh = MethodHandles.lookup().unreflect(privateStaticMethod); in testUnreflects()
467 assertEquals("privateStaticMethod", (String) mh.invoke()); in testUnreflects()
468 assertEquals("privateStaticMethod", (String) mh.invokeExact()); in testUnreflects()
472 mh = MethodHandles.lookup().unreflectConstructor(privateConstructor); in testUnreflects()
477 mh = MethodHandles.lookup().unreflectConstructor(privateConstructor); in testUnreflects()
478 instance = (UnreflectTester) mh.invokeExact("abc"); in testUnreflects()
480 instance = (UnreflectTester) mh.invoke("def"); in testUnreflects()
484 mh = MethodHandles.lookup().unreflectConstructor(publicConstructor); in testUnreflects()
485 instance = (UnreflectTester) mh.invokeExact("abc", false); in testUnreflects()
487 instance = (UnreflectTester) mh.invoke("def", true); in testUnreflects()
494 mh = MethodHandles.lookup().unreflectGetter(publicField); in testUnreflects()
496 assertEquals("instanceValue", (String) mh.invokeExact(instance)); in testUnreflects()
498 mh = MethodHandles.lookup().unreflectSetter(publicField); in testUnreflects()
500 mh.invokeExact(instance, "updatedInstanceValue"); in testUnreflects()
504 mh = MethodHandles.lookup().unreflectGetter(publicStaticField); in testUnreflects()
506 assertEquals("updatedStaticValue", (String) mh.invokeExact()); in testUnreflects()
508 mh = MethodHandles.lookup().unreflectSetter(publicStaticField); in testUnreflects()
510 mh.invokeExact("updatedStaticValue2"); in testUnreflects()
515 mh = MethodHandles.lookup().unreflectGetter(privateField); in testUnreflects()
520 mh = MethodHandles.lookup().unreflectSetter(privateField); in testUnreflects()
527 mh = MethodHandles.lookup().unreflectGetter(privateField); in testUnreflects()
529 assertEquals("instanceValue", (String) mh.invokeExact(instance)); in testUnreflects()
531 mh = MethodHandles.lookup().unreflectSetter(privateField); in testUnreflects()
533 mh.invokeExact(instance, "updatedInstanceValue"); in testUnreflects()
538 mh = MethodHandles.lookup().unreflectGetter(privateStaticField); in testUnreflects()
543 mh = MethodHandles.lookup().unreflectSetter(privateStaticField); in testUnreflects()
549 mh = MethodHandles.lookup().unreflectGetter(privateStaticField); in testUnreflects()
551 assertEquals("updatedStaticValue", (String) mh.invokeExact()); in testUnreflects()
553 mh = MethodHandles.lookup().unreflectSetter(privateStaticField); in testUnreflects()
555 mh.invokeExact("updatedStaticValue2"); in testUnreflects()
594 MethodHandle mh = MethodHandles.lookup().findVirtual(String.class, in testAsType() local
598 MethodHandle asType = mh.asType( in testAsType()
622 mh.asType(MethodType.methodType(int.class, String.class, String.class)); in testAsType()
629 mh.asType(MethodType.methodType(String.class, int.class, String.class)); in testAsType()
686 MethodHandle mh = in testConstructors() local
690 Float value = (Float) mh.invokeExact(0.33f); in testConstructors()
695 value = (Float) mh.invoke(3.34f); in testConstructors()
700 mh = MethodHandles.lookup().findConstructor(Double.class, in testConstructors()
702 Double d = (Double) mh.invoke("8.45e3"); in testConstructors()
707 mh = MethodHandles.lookup().findConstructor(Double.class, in testConstructors()
709 d = (Double) mh.invoke(8.45e3); in testConstructors()
716 mh = MethodHandles.lookup().findConstructor(int.class, MethodType.methodType(void.class)); in testConstructors()
722 mh = MethodHandles.lookup().findConstructor(Readable.class, in testConstructors()
728 mh = MethodHandles.lookup().findConstructor(Process.class, MethodType.methodType(void.class)); in testConstructors()
730 mh.invoke(); in testConstructors()
760 MethodHandle mh = MethodHandles.lookup().findConstructor( in testStringConstructors() local
762 String s = (String) mh.invokeExact(); in testStringConstructors()
768 mh = MethodHandles.lookup().findConstructor( in testStringConstructors()
770 s = (String) mh.invokeExact(testPattern); in testStringConstructors()
776 mh = MethodHandles.lookup().findConstructor( in testStringConstructors()
778 s = (String) mh.invokeExact(testPattern.toCharArray()); in testStringConstructors()
784 mh = MethodHandles.lookup().findConstructor( in testStringConstructors()
786 s = (String) mh.invokeExact(new char [] { 'a', 'b', 'c', 'd', 'e'}, 2, 3); in testStringConstructors()
797 mh = MethodHandles.lookup().findConstructor( in testStringConstructors()
799 s = (String) mh.invokeExact(codePoints, 0, codePoints.length); in testStringConstructors()
806 mh = MethodHandles.lookup().findConstructor( in testStringConstructors()
808 s = (String) mh.invokeExact(ascii, 0, ascii.length); in testStringConstructors()
814 mh = MethodHandles.lookup().findConstructor( in testStringConstructors()
817 s = (String) mh.invokeExact(ascii, 0, 5, StandardCharsets.US_ASCII.name()); in testStringConstructors()
823 mh = MethodHandles.lookup().findConstructor( in testStringConstructors()
826 s = (String) mh.invokeExact(ascii, 0, 5, StandardCharsets.US_ASCII); in testStringConstructors()
832 mh = MethodHandles.lookup().findConstructor( in testStringConstructors()
835 s = (String) mh.invokeExact(ascii, StandardCharsets.US_ASCII.name()); in testStringConstructors()
841 mh = MethodHandles.lookup().findConstructor( in testStringConstructors()
843 s = (String) mh.invokeExact(ascii, StandardCharsets.US_ASCII); in testStringConstructors()
849 mh = MethodHandles.lookup().findConstructor( in testStringConstructors()
851 s = (String) mh.invokeExact(ascii, 1, ascii.length - 2); in testStringConstructors()
858 mh = MethodHandles.lookup().findConstructor( in testStringConstructors()
860 s = (String) mh.invokeExact(ascii); in testStringConstructors()
866 mh = MethodHandles.lookup().findConstructor( in testStringConstructors()
868 s = (String) mh.invokeExact(sb); in testStringConstructors()
877 MethodHandle mh = MethodHandles.lookup().findStatic( in testReferenceReturnValueConversions() local
881 Float f = (Float) mh.invokeExact("1.375"); in testReferenceReturnValueConversions()
885 f = (Float) mh.invoke("1.875"); in testReferenceReturnValueConversions()
892 int i = (int) mh.invokeExact("7.77"); in testReferenceReturnValueConversions()
897 int i = (int) mh.invoke("7.77"); in testReferenceReturnValueConversions()
902 Number n = (Number) mh.invoke("1.11"); in testReferenceReturnValueConversions()
904 Number o = (Number) mh.invokeExact("1.11"); in testReferenceReturnValueConversions()
910 Double u = (Double) mh.invoke("1.11"); in testReferenceReturnValueConversions()
915 Double v = (Double) mh.invokeExact("1.11"); in testReferenceReturnValueConversions()
920 float p = (float) mh.invoke("1.11"); in testReferenceReturnValueConversions()
926 double d = (double) mh.invoke("2.5"); in testReferenceReturnValueConversions()
932 Comparable<Float> c = (Comparable<Float>) mh.invoke("2.125"); in testReferenceReturnValueConversions()
941 MethodHandle mh = MethodHandles.lookup().findStatic( in testPrimitiveReturnValueConversions() local
948 if ((int) mh.invokeExact(LARGE, SMALL) != SMALL) { in testPrimitiveReturnValueConversions()
950 } else if ((int) mh.invoke(LARGE, SMALL) != SMALL) { in testPrimitiveReturnValueConversions()
952 } else if ((int) mh.invokeExact(SMALL, LARGE) != SMALL) { in testPrimitiveReturnValueConversions()
954 } else if ((int) mh.invoke(SMALL, LARGE) != SMALL) { in testPrimitiveReturnValueConversions()
960 if ((long) mh.invokeExact(LARGE, SMALL) != (long) SMALL) {} in testPrimitiveReturnValueConversions()
964 if ((long) mh.invoke(LARGE, SMALL) != (long) SMALL) { in testPrimitiveReturnValueConversions()
970 if ((short) mh.invokeExact(LARGE, SMALL) != (short) SMALL) {} in testPrimitiveReturnValueConversions()
975 if ((short) mh.invoke(LARGE, SMALL) != (short) SMALL) { in testPrimitiveReturnValueConversions()
982 if (!((Integer) mh.invokeExact(LARGE, SMALL)).equals(new Integer(SMALL))) {} in testPrimitiveReturnValueConversions()
986 if (!((Integer) mh.invoke(LARGE, SMALL)).equals(new Integer(SMALL))) { in testPrimitiveReturnValueConversions()
992 Long l = (Long) mh.invokeExact(LARGE, SMALL); in testPrimitiveReturnValueConversions()
997 Long l = (Long) mh.invoke(LARGE, SMALL); in testPrimitiveReturnValueConversions()
1003 Short s = (Short) mh.invokeExact(LARGE, SMALL); in testPrimitiveReturnValueConversions()
1008 Short s = (Short) mh.invoke(LARGE, SMALL); in testPrimitiveReturnValueConversions()
1014 Process p = (Process) mh.invokeExact(LARGE, SMALL); in testPrimitiveReturnValueConversions()
1019 Process p = (Process) mh.invoke(LARGE, SMALL); in testPrimitiveReturnValueConversions()
1024 mh = MethodHandles.lookup().findStatic(System.class, "gc", MethodType.methodType(void.class)); in testPrimitiveReturnValueConversions()
1025 Object o = (Object) mh.invoke(); in testPrimitiveReturnValueConversions()
1029 long l = (long) mh.invoke(); in testPrimitiveReturnValueConversions()
1033 mh = MethodHandles.lookup().findStatic(Boolean.class, "parseBoolean", in testPrimitiveReturnValueConversions()
1035 Boolean z = (Boolean) mh.invoke("True"); in testPrimitiveReturnValueConversions()
1040 int dummy = (int) mh.invoke("True"); in testPrimitiveReturnValueConversions()
1046 Integer dummy = (Integer) mh.invoke("True"); in testPrimitiveReturnValueConversions()
1051 mh = MethodHandles.lookup().findStatic(Boolean.class, "valueOf", in testPrimitiveReturnValueConversions()
1053 boolean w = (boolean) mh.invoke(false); in testPrimitiveReturnValueConversions()
1058 int dummy = (int) mh.invoke(false); in testPrimitiveReturnValueConversions()
1064 Integer dummy = (Integer) mh.invoke("True"); in testPrimitiveReturnValueConversions()
1179 MethodHandle mh; in testVariableArity() local
1187 mh = MethodHandles.lookup().findVirtual(VariableArityTester.class, "update", in testVariableArity()
1189 assertTrue(mh.isVarargsCollector()); in testVariableArity()
1190 assertFalse(mh.asFixedArity().isVarargsCollector()); in testVariableArity()
1191 assertEquals("[]", mh.invoke(vat)); in testVariableArity()
1192 assertEquals("[true, false, true]", mh.invoke(vat, true, false, true)); in testVariableArity()
1193 assertEquals("[true, false, true]", mh.invoke(vat, new boolean[] { true, false, true})); in testVariableArity()
1194 assertEquals("[false, true]", mh.invoke(vat, Boolean.valueOf(false), Boolean.valueOf(true))); in testVariableArity()
1196 mh.invoke(vat, true, true, 0); in testVariableArity()
1200 assertEquals("[false, true]", mh.invoke(vat, Boolean.valueOf(false), (Boolean) null)); in testVariableArity()
1205 mh = MethodHandles.lookup().findVirtual(VariableArityTester.class, "update", in testVariableArity()
1207 assertTrue(mh.isVarargsCollector()); in testVariableArity()
1208 assertEquals("[]", mh.invoke(vat)); in testVariableArity()
1209 assertEquals("[32, 64, 97]", mh.invoke(vat, (byte) 32, Byte.valueOf((byte) 64), (byte) 97)); in testVariableArity()
1210 assertEquals("[32, 64, 97]", mh.invoke(vat, new byte[] {(byte) 32, (byte) 64, (byte) 97})); in testVariableArity()
1212 mh.invoke(vat, (byte) 1, Integer.valueOf(3), (byte) 0); in testVariableArity()
1217 mh = MethodHandles.lookup().findVirtual(VariableArityTester.class, "update", in testVariableArity()
1219 assertTrue(mh.isVarargsCollector()); in testVariableArity()
1220 assertEquals("[]", mh.invoke(vat)); in testVariableArity()
1221 assertEquals("[A, B, C]", mh.invoke(vat, 'A', Character.valueOf('B'), 'C')); in testVariableArity()
1222 assertEquals("[W, X, Y, Z]", mh.invoke(vat, new char[] { 'W', 'X', 'Y', 'Z' })); in testVariableArity()
1225 mh = MethodHandles.lookup().findVirtual(VariableArityTester.class, "update", in testVariableArity()
1227 assertTrue(mh.isVarargsCollector()); in testVariableArity()
1228 assertEquals("[]", mh.invoke(vat)); in testVariableArity()
1230 mh.invoke(vat, Short.MAX_VALUE, Short.MIN_VALUE, Short.valueOf((short) 0))); in testVariableArity()
1231 assertEquals("[1, -1]", mh.invoke(vat, new short[] { (short) 1, (short) -1 })); in testVariableArity()
1234 mh = MethodHandles.lookup().findVirtual(VariableArityTester.class, "update", in testVariableArity()
1236 assertTrue(mh.isVarargsCollector()); in testVariableArity()
1237 assertEquals("[]", mh.invoke(vat)); in testVariableArity()
1239 mh.invoke(vat, Integer.valueOf(0), Integer.MAX_VALUE, Integer.MIN_VALUE, 0)); in testVariableArity()
1240 assertEquals("[0, -1, 1, 0]", mh.invoke(vat, new int[] { 0, -1, 1, 0 })); in testVariableArity()
1242 assertEquals("[5, 4, 3, 2, 1]", (String) mh.invokeExact(vat, new int [] { 5, 4, 3, 2, 1 })); in testVariableArity()
1244 assertEquals("[5, 4, 3, 2, 1]", (String) mh.invokeExact(vat, 5, 4, 3, 2, 1)); in testVariableArity()
1247 assertEquals("[5, 4, 3, 2, 1]", (String) mh.invoke(vat, 5, 4, 3, 2, 1)); in testVariableArity()
1250 mh = MethodHandles.lookup().findVirtual(VariableArityTester.class, "update", in testVariableArity()
1252 assertTrue(mh.isVarargsCollector()); in testVariableArity()
1253 assertEquals("[]", mh.invoke(vat)); in testVariableArity()
1255 mh.invoke(vat, Long.valueOf(0), Long.MAX_VALUE, Long.MIN_VALUE)); in testVariableArity()
1256 assertEquals("[0, -1, 1, 0]", mh.invoke(vat, new long[] { 0, -1, 1, 0 })); in testVariableArity()
1259 mh = MethodHandles.lookup().findVirtual(VariableArityTester.class, "update", in testVariableArity()
1261 assertTrue(mh.isVarargsCollector()); in testVariableArity()
1262 assertEquals("[]", mh.invoke(vat)); in testVariableArity()
1264 mh.invoke(vat, 0.0f, Float.valueOf(1.25f), Float.valueOf(-1.25f))); in testVariableArity()
1266 mh.invoke(vat, new float[] { 0.0f, -1.0f, 1.0f, 0.0f })); in testVariableArity()
1269 mh = MethodHandles.lookup().findVirtual(VariableArityTester.class, "update", in testVariableArity()
1271 assertTrue(mh.isVarargsCollector()); in testVariableArity()
1272 assertEquals("[]", mh.invoke(vat)); in testVariableArity()
1274 mh.invoke(vat, 0.0, Double.valueOf(1.25), Double.valueOf(-1.25))); in testVariableArity()
1276 mh.invoke(vat, new double[] { 0.0, -1.0, 1.0, 0.0 })); in testVariableArity()
1277 mh.invoke(vat, 0.3f, 1.33, 1.33); in testVariableArity()
1280 mh = MethodHandles.lookup(). in testVariableArity()
1283 assertTrue(mh.isVarargsCollector()); in testVariableArity()
1284 assertEquals("Echidna, []", mh.invoke(vat, "Echidna")); in testVariableArity()
1286 mh.invoke(vat, "Bongo", "Jerboa", "Okapi")); in testVariableArity()
1289 mh = MethodHandles.lookup(). in testVariableArity()
1292 assertTrue(mh.isVarargsCollector()); in testVariableArity()
1294 (String) mh.invoke(vat, Float.valueOf(9.99f), in testVariableArity()
1299 (String) mh.invoke(vat, Float.valueOf(9.99f), Float.valueOf(0.0f), in testVariableArity()
1302 (String) mh.invoke(vat, Float.valueOf(9.99f), 0.0f, 0.1f, 1.1f)); in testVariableArity()
1305 (String) mh.invoke(vat, Float.valueOf(9.99f), 77, 33, 64)); in testVariableArity()
1309 (String) mh.invokeExact(vat, Float.valueOf(9.99f), in testVariableArity()
1314 (String) mh.invokeExact(vat, Float.valueOf(9.99f), in testVariableArity()
1320 (String) mh.invokeExact(vat, Float.valueOf(9.99f), 0.0f, 0.1f, 1.1f)); in testVariableArity()
1325 mh = MethodHandles.lookup(). in testVariableArity()
1328 assertTrue(mh.isVarargsCollector()); in testVariableArity()
1329 assertFalse(mh.asFixedArity().isVarargsCollector()); in testVariableArity()
1330 assertEquals("x, []", (String) mh.invoke(vat, 'x')); in testVariableArity()
1331 assertEquals("x, [3.141]", (String) mh.invoke(vat, 'x', 3.141)); in testVariableArity()
1333 (String) mh.invoke(vat, 'x', null, 3.131, new Integer(37))); in testVariableArity()
1336 (String) mh.invoke(vat, 'x', null, 3.131, "bad", new Integer(37))); in testVariableArity()
1342 (String) mh.invoke( in testVariableArity()
1349 mh = MethodHandles.lookup().findVirtual( in testVariableArity()
1352 assertFalse(mh.isVarargsCollector()); in testVariableArity()
1353 mh.invoke(vat, new Object[] { "123" }); in testVariableArity()
1355 assertEquals("-", mh.invoke(vat, new Float(3), new Float(4))); in testVariableArity()
1358 mh = mh.asVarargsCollector(Object[].class); in testVariableArity()
1359 assertTrue(mh.isVarargsCollector()); in testVariableArity()
1360 assertEquals("[3.0, 4.0]", (String) mh.invoke(vat, new Float(3), new Float(4))); in testVariableArity()
1363 mh = MethodHandles.lookup().findConstructor( in testVariableArity()
1365 assertFalse(mh.isVarargsCollector()); in testVariableArity()
1368 mh = MethodHandles.lookup().findConstructor( in testVariableArity()
1370 assertTrue(mh.isVarargsCollector()); in testVariableArity()
1372 ((VariableArityTester) mh.invoke(new boolean[] {true, true, false})).lastResult()); in testVariableArity()
1374 ((VariableArityTester) mh.invoke(true, true, false)).lastResult()); in testVariableArity()
1377 ((VariableArityTester) mh.invokeExact(true, true, false)).lastResult()); in testVariableArity()
1382 mh = MethodHandles.lookup().findConstructor( in testVariableArity()
1384 assertTrue(mh.isVarargsCollector()); in testVariableArity()
1387 mh.invoke(new byte[] {(byte) 55, (byte) 66, (byte) 60})).lastResult()); in testVariableArity()
1389 ((VariableArityTester) mh.invoke( in testVariableArity()
1393 ((VariableArityTester) mh.invokeExact( in testVariableArity()
1399 ((VariableArityTester) mh.invoke( in testVariableArity()
1405 mh = MethodHandles.lookup().findConstructor( in testVariableArity()
1407 assertTrue(mh.isVarargsCollector()); in testVariableArity()
1408 assertEquals("x, []", ((VariableArityTester) mh.invoke("x")).lastResult()); in testVariableArity()
1409 assertEquals("x, [y]", ((VariableArityTester) mh.invoke("x", "y")).lastResult()); in testVariableArity()
1411 ((VariableArityTester) mh.invoke("x", new String[] { "y", "z" })).lastResult()); in testVariableArity()
1413 assertEquals("x, [y]", ((VariableArityTester) mh.invokeExact("x", "y")).lastResult()); in testVariableArity()
1417 ((VariableArityTester) mh.invoke("x", new String[] { null, "z" })).lastResult()); in testVariableArity()
1420 mh = MethodHandles.lookup().findConstructor( in testVariableArity()
1422 assertTrue(mh.isVarargsCollector()); in testVariableArity()
1423 assertFalse(mh.asFixedArity().isVarargsCollector()); in testVariableArity()
1424 assertEquals("x, []", ((VariableArityTester) mh.invoke('x')).lastResult()); in testVariableArity()
1425 assertEquals("x, [3.141]", ((VariableArityTester) mh.invoke('x', 3.141)).lastResult()); in testVariableArity()
1427 ((VariableArityTester) mh.invoke('x', null, 3.131, new Integer(37))).lastResult()); in testVariableArity()
1430 ((VariableArityTester) mh.invoke( in testVariableArity()
1437 ((VariableArityTester) mh.invoke( in testVariableArity()
1444 mh = MethodHandles.lookup(). in testVariableArity()
1447 assertTrue(mh.isVarargsCollector()); in testVariableArity()
1449 (String) mh.invoke(Float.valueOf(9.99f), in testVariableArity()
1454 (String) mh.invoke(Float.valueOf(9.99f), Float.valueOf(0.0f), in testVariableArity()
1457 (String) mh.invoke(Float.valueOf(9.99f), 0.0f, 0.1f, 1.1f)); in testVariableArity()
1460 (String) mh.invoke(Float.valueOf(9.99f), 77, 33, 64)); in testVariableArity()
1464 (String) mh.invokeExact(Float.valueOf(9.99f), in testVariableArity()
1469 (String) mh.invokeExact(Float.valueOf(9.99f), in testVariableArity()
1475 (String) mh.invokeExact(Float.valueOf(9.99f), 0.0f, 0.1f, 1.1f)); in testVariableArity()
1480 mh = VariableArityTester.lookup(). in testVariableArity()
1484 assertTrue(mh.isVarargsCollector()); in testVariableArity()
1486 (String) mh.invoke(vat, in testVariableArity()
1492 (String) mh.invoke(vat, Float.valueOf(9.99f), Float.valueOf(0.0f), in testVariableArity()
1496 mh = MethodHandles.lookup().findVirtual(VariableArityTester.class, "update", in testVariableArity()
1498 assertEquals("[1, 2, 3]", (String) mh.invoke(vat, 1, 2, 3)); in testVariableArity()
1499 assertEquals("[1, 2, 3]", (Object) mh.invoke(vat, 1, 2, 3)); in testVariableArity()
1501 assertEquals("[1, 2, 3, 4]", (long) mh.invoke(vat, 1, 2, 3)); in testVariableArity()
1505 mh = MethodHandles.lookup().findStatic(VariableArityTester.class, "sumToPrimitive", in testVariableArity()
1507 assertEquals(10l, (long) mh.invoke(1, 2, 3, 4)); in testVariableArity()
1508 assertEquals(Long.valueOf(10l), (Long) mh.invoke(1, 2, 3, 4)); in testVariableArity()
1509 mh = MethodHandles.lookup().findStatic(VariableArityTester.class, "sumToReference", in testVariableArity()
1511 Object o = mh.invoke(1, 2, 3, 4); in testVariableArity()
1512 long l = (long) mh.invoke(1, 2, 3, 4); in testVariableArity()
1513 assertEquals(10l, (long) mh.invoke(1, 2, 3, 4)); in testVariableArity()
1514 assertEquals(Long.valueOf(10l), (Long) mh.invoke(1, 2, 3, 4)); in testVariableArity()
1518 assertEquals(Long.valueOf(10l), (Byte) mh.invoke(1, 2, 3, 4)); in testVariableArity()
1524 byte b = (byte) mh.invoke(1, 2, 3, 4); in testVariableArity()
1529 mh = MethodHandles.lookup().findStatic(VariableArityTester.class, "foo", in testVariableArity()
1531 assertEquals(null, (Object) mh.invoke(3, 2, 1)); in testVariableArity()
1532 assertEquals(0l, (long) mh.invoke(1, 2, 3)); in testVariableArity()
1535 mh = MethodHandles.lookup().findVirtual(VariableArityTester.class, "update", in testVariableArity()
1537 assertTrue(mh.isVarargsCollector()); in testVariableArity()
1538 mh = mh.bindTo(vat); in testVariableArity()
1539 assertFalse(mh.isVarargsCollector()); in testVariableArity()
1540 mh = mh.asVarargsCollector(boolean[].class); in testVariableArity()
1541 assertTrue(mh.isVarargsCollector()); in testVariableArity()
1542 assertEquals("[]", mh.invoke()); in testVariableArity()
1543 assertEquals("[true, false, true]", mh.invoke(true, false, true)); in testVariableArity()
1544 assertEquals("[true, false, true]", mh.invoke(new boolean[] { true, false, true})); in testVariableArity()
1545 assertEquals("[false, true]", mh.invoke(Boolean.valueOf(false), Boolean.valueOf(true))); in testVariableArity()
1547 mh.invoke(true, true, 0); in testVariableArity()
1556 MethodHandle mh = MethodHandles.lookup().bind(vat, "update", in testVariableArity_MethodHandles_bind() local
1558 assertTrue(mh.isVarargsCollector()); in testVariableArity_MethodHandles_bind()
1560 assertEquals("[]", mh.invoke()); in testVariableArity_MethodHandles_bind()
1561 assertEquals("[true, false, true]", mh.invoke(true, false, true)); in testVariableArity_MethodHandles_bind()
1562 assertEquals("[true, false, true]", mh.invoke(new boolean[] { true, false, true})); in testVariableArity_MethodHandles_bind()
1563 assertEquals("[false, true]", mh.invoke(Boolean.valueOf(false), Boolean.valueOf(true))); in testVariableArity_MethodHandles_bind()
1566 mh.invoke(true, true, 0); in testVariableArity_MethodHandles_bind()