Lines Matching refs:invoke
17 import java.lang.invoke.MethodHandle;
18 import java.lang.invoke.MethodHandleInfo;
19 import java.lang.invoke.MethodHandles;
20 import java.lang.invoke.MethodHandles.Lookup;
21 import java.lang.invoke.MethodType;
22 import java.lang.invoke.WrongMethodTypeException;
134 mh1.invoke(bInstance); in testfindSpecial_invokeSuperBehaviour()
139 mh1.invoke(aInstance); in testfindSpecial_invokeSuperBehaviour()
152 mh1.invoke(cInstance); in testfindSpecial_invokeSuperBehaviour()
186 mh3.invoke(dInstance); in testfindSpecial_invokeDirectBehaviour()
300 String str = (String) mh.invoke(new BarImpl()); in testfindVirtual()
309 str = (String) mh.invoke(new BarImpl()); in testfindVirtual()
332 str = (String) mh.invoke(new BarImpl()); in testfindVirtual()
339 str = (String) mh.invoke(new BarImpl()); in testfindVirtual()
346 str = (String) mh.invoke(new BarImpl()); in testfindVirtual()
355 str = (String) mh.invoke(new BarImpl()); in testfindVirtual()
362 str = (String) mh.invoke(new BarImpl()); in testfindVirtual()
369 str = (String) mh.invoke(new BarImpl()); in testfindVirtual()
450 assertEquals("publicMethod", (String) mh.invoke(instance)); in testUnreflects()
455 assertEquals("publicStaticMethod", (String) mh.invoke()); in testUnreflects()
466 assertEquals("privateMethod", (String) mh.invoke(instance)); in testUnreflects()
477 assertEquals("privateStaticMethod", (String) mh.invoke()); in testUnreflects()
490 instance = (UnreflectTester) mh.invoke("def"); in testUnreflects()
497 instance = (UnreflectTester) mh.invoke("def", true); in testUnreflects()
575 lookupInG.unreflectSpecial(methodInG, G.class).invoke(g); // prints "G.sayHi()" in testUnreflects()
578 lookupInG.unreflect(methodInF).invoke(g); // prints "G.sayHi()" in testUnreflects()
579 lookupInG.in(G.class).unreflectSpecial(methodInF, G.class).invoke(g); // prints "F.sayHi()" in testUnreflects()
589 lookupInH.unreflectSpecial(methodInH, H.class).invoke(h); in testUnreflects()
592 lookupInH.unreflect(methodInChatty).invoke(h); in testUnreflects()
593 lookupInH.in(H.class).unreflectSpecial(methodInChatty, H.class).invoke(h); in testUnreflects()
650 assertEquals(false, booleanMH.invoke()); in testAsType()
655 assertEquals(0, intMH.invoke()); in testAsType()
660 assertEquals(0L, longMH.invoke()); in testAsType()
665 assertEquals(null, objMH.invoke()); in testAsType()
729 value = (Float) mh.invoke(3.34f); in testConstructors()
736 Double d = (Double) mh.invoke("8.45e3"); in testConstructors()
743 d = (Double) mh.invoke(8.45e3); in testConstructors()
764 mh.invoke(); in testConstructors()
935 assertEquals((byte) -77, (byte) mhByteValue.invoke(Byte.valueOf((byte) -77))); in testReturnValues()
941 assertEquals(Character.MAX_SURROGATE, (char) mhCharacterValue.invoke()); in testReturnValues()
949 assertEquals(Math.sin(i), (double) mhSin.invoke(i)); in testReturnValues()
957 assertEquals(Math.abs(-3.3e6f), (float) mhAbsFloat.invoke(-3.3e6f)); in testReturnValues()
963 assertEquals(Math.abs(-1000), (int) mhAbsInt.invoke(-1000)); in testReturnValues()
973 assertEquals(Long.MAX_VALUE, (long) mhMaxLong.invoke(Long.MAX_VALUE, Long.MAX_VALUE / 2)); in testReturnValues()
975 assertEquals(0x0123456789abcdefL, (long) mhMaxLong.invoke(0x0123456789abcdefL, 0L)); in testReturnValues()
983 assertEquals((short) -7890, ((Short) mhShortValueOf.invoke((short) -7890)).shortValue()); in testReturnValues()
991 assertTrue(Arrays.equals(array, (int[]) mhCopyOf.invoke(array, array.length))); in testReturnValues()
997 assertEquals((short) 12131, (short) mhShortValue.invoke(Short.valueOf((short) 12131))); in testReturnValues()
1004 assertEquals(true, (boolean) mhBooleanValue.invoke(Boolean.valueOf(true))); in testReturnValues()
1006 assertEquals(false, (boolean) mhBooleanValue.invoke(Boolean.valueOf(false))); in testReturnValues()
1020 f = (Float) mh.invoke("1.875"); in testReferenceReturnValueConversions()
1032 int i = (int) mh.invoke("7.77"); in testReferenceReturnValueConversions()
1037 Number n = (Number) mh.invoke("1.11"); in testReferenceReturnValueConversions()
1045 Double u = (Double) mh.invoke("1.11"); in testReferenceReturnValueConversions()
1055 float p = (float) mh.invoke("1.11"); in testReferenceReturnValueConversions()
1061 double d = (double) mh.invoke("2.5"); in testReferenceReturnValueConversions()
1067 Comparable<Float> c = (Comparable<Float>) mh.invoke("2.125"); in testReferenceReturnValueConversions()
1085 } else if ((int) mh.invoke(LARGE, SMALL) != SMALL) { in testPrimitiveReturnValueConversions()
1089 } else if ((int) mh.invoke(SMALL, LARGE) != SMALL) { in testPrimitiveReturnValueConversions()
1099 if ((long) mh.invoke(LARGE, SMALL) != (long) SMALL) { in testPrimitiveReturnValueConversions()
1110 if ((short) mh.invoke(LARGE, SMALL) != (short) SMALL) { in testPrimitiveReturnValueConversions()
1121 if (!((Integer) mh.invoke(LARGE, SMALL)).equals(new Integer(SMALL))) { in testPrimitiveReturnValueConversions()
1132 Long l = (Long) mh.invoke(LARGE, SMALL); in testPrimitiveReturnValueConversions()
1143 Short s = (Short) mh.invoke(LARGE, SMALL); in testPrimitiveReturnValueConversions()
1154 Process p = (Process) mh.invoke(LARGE, SMALL); in testPrimitiveReturnValueConversions()
1160 Object o = (Object) mh.invoke(); in testPrimitiveReturnValueConversions()
1164 long l = (long) mh.invoke(); in testPrimitiveReturnValueConversions()
1170 Boolean z = (Boolean) mh.invoke("True"); in testPrimitiveReturnValueConversions()
1175 int dummy = (int) mh.invoke("True"); in testPrimitiveReturnValueConversions()
1181 Integer dummy = (Integer) mh.invoke("True"); in testPrimitiveReturnValueConversions()
1188 boolean w = (boolean) mh.invoke(false); in testPrimitiveReturnValueConversions()
1193 int dummy = (int) mh.invoke(false); in testPrimitiveReturnValueConversions()
1199 Integer dummy = (Integer) mh.invoke("True"); in testPrimitiveReturnValueConversions()
1326 assertEquals("[]", mh.invoke(vat)); in testVariableArity()
1327 assertEquals("[true, false, true]", mh.invoke(vat, true, false, true)); in testVariableArity()
1328 assertEquals("[true, false, true]", mh.invoke(vat, new boolean[] { true, false, true})); in testVariableArity()
1329 assertEquals("[false, true]", mh.invoke(vat, Boolean.valueOf(false), Boolean.valueOf(true))); in testVariableArity()
1331 mh.invoke(vat, true, true, 0); in testVariableArity()
1335 assertEquals("[false, true]", mh.invoke(vat, Boolean.valueOf(false), (Boolean) null)); in testVariableArity()
1343 assertEquals("[]", mh.invoke(vat)); in testVariableArity()
1344 assertEquals("[32, 64, 97]", mh.invoke(vat, (byte) 32, Byte.valueOf((byte) 64), (byte) 97)); in testVariableArity()
1345 assertEquals("[32, 64, 97]", mh.invoke(vat, new byte[] {(byte) 32, (byte) 64, (byte) 97})); in testVariableArity()
1347 mh.invoke(vat, (byte) 1, Integer.valueOf(3), (byte) 0); in testVariableArity()
1355 assertEquals("[]", mh.invoke(vat)); in testVariableArity()
1356 assertEquals("[A, B, C]", mh.invoke(vat, 'A', Character.valueOf('B'), 'C')); in testVariableArity()
1357 assertEquals("[W, X, Y, Z]", mh.invoke(vat, new char[] { 'W', 'X', 'Y', 'Z' })); in testVariableArity()
1363 assertEquals("[]", mh.invoke(vat)); in testVariableArity()
1365 mh.invoke(vat, Short.MAX_VALUE, Short.MIN_VALUE, Short.valueOf((short) 0))); in testVariableArity()
1366 assertEquals("[1, -1]", mh.invoke(vat, new short[] { (short) 1, (short) -1 })); in testVariableArity()
1372 assertEquals("[]", mh.invoke(vat)); in testVariableArity()
1374 mh.invoke(vat, Integer.valueOf(0), Integer.MAX_VALUE, Integer.MIN_VALUE, 0)); in testVariableArity()
1375 assertEquals("[0, -1, 1, 0]", mh.invoke(vat, new int[] { 0, -1, 1, 0 })); in testVariableArity()
1382 assertEquals("[5, 4, 3, 2, 1]", (String) mh.invoke(vat, 5, 4, 3, 2, 1)); in testVariableArity()
1388 assertEquals("[]", mh.invoke(vat)); in testVariableArity()
1390 mh.invoke(vat, Long.valueOf(0), Long.MAX_VALUE, Long.MIN_VALUE)); in testVariableArity()
1391 assertEquals("[0, -1, 1, 0]", mh.invoke(vat, new long[] { 0, -1, 1, 0 })); in testVariableArity()
1397 assertEquals("[]", mh.invoke(vat)); in testVariableArity()
1399 mh.invoke(vat, 0.0f, Float.valueOf(1.25f), Float.valueOf(-1.25f))); in testVariableArity()
1401 mh.invoke(vat, new float[] { 0.0f, -1.0f, 1.0f, 0.0f })); in testVariableArity()
1407 assertEquals("[]", mh.invoke(vat)); in testVariableArity()
1409 mh.invoke(vat, 0.0, Double.valueOf(1.25), Double.valueOf(-1.25))); in testVariableArity()
1411 mh.invoke(vat, new double[] { 0.0, -1.0, 1.0, 0.0 })); in testVariableArity()
1412 mh.invoke(vat, 0.3f, 1.33, 1.33); in testVariableArity()
1419 assertEquals("Echidna, []", mh.invoke(vat, "Echidna")); in testVariableArity()
1421 mh.invoke(vat, "Bongo", "Jerboa", "Okapi")); in testVariableArity()
1429 (String) mh.invoke(vat, Float.valueOf(9.99f), in testVariableArity()
1434 (String) mh.invoke(vat, Float.valueOf(9.99f), Float.valueOf(0.0f), in testVariableArity()
1437 (String) mh.invoke(vat, Float.valueOf(9.99f), 0.0f, 0.1f, 1.1f)); in testVariableArity()
1440 (String) mh.invoke(vat, Float.valueOf(9.99f), 77, 33, 64)); in testVariableArity()
1465 assertEquals("x, []", (String) mh.invoke(vat, 'x')); in testVariableArity()
1466 assertEquals("x, [3.141]", (String) mh.invoke(vat, 'x', 3.141)); in testVariableArity()
1468 (String) mh.invoke(vat, 'x', null, 3.131, new Integer(37))); in testVariableArity()
1471 (String) mh.invoke(vat, 'x', null, 3.131, "bad", new Integer(37))); in testVariableArity()
1477 (String) mh.invoke( in testVariableArity()
1488 mh.invoke(vat, new Object[] { "123" }); in testVariableArity()
1490 assertEquals("-", mh.invoke(vat, new Float(3), new Float(4))); in testVariableArity()
1495 assertEquals("[3.0, 4.0]", (String) mh.invoke(vat, new Float(3), new Float(4))); in testVariableArity()
1507 ((VariableArityTester) mh.invoke(new boolean[] {true, true, false})).lastResult()); in testVariableArity()
1509 ((VariableArityTester) mh.invoke(true, true, false)).lastResult()); in testVariableArity()
1522 mh.invoke(new byte[] {(byte) 55, (byte) 66, (byte) 60})).lastResult()); in testVariableArity()
1524 ((VariableArityTester) mh.invoke( in testVariableArity()
1534 ((VariableArityTester) mh.invoke( in testVariableArity()
1543 assertEquals("x, []", ((VariableArityTester) mh.invoke("x")).lastResult()); in testVariableArity()
1544 assertEquals("x, [y]", ((VariableArityTester) mh.invoke("x", "y")).lastResult()); in testVariableArity()
1546 ((VariableArityTester) mh.invoke("x", new String[] { "y", "z" })).lastResult()); in testVariableArity()
1552 ((VariableArityTester) mh.invoke("x", new String[] { null, "z" })).lastResult()); in testVariableArity()
1559 assertEquals("x, []", ((VariableArityTester) mh.invoke('x')).lastResult()); in testVariableArity()
1560 assertEquals("x, [3.141]", ((VariableArityTester) mh.invoke('x', 3.141)).lastResult()); in testVariableArity()
1562 ((VariableArityTester) mh.invoke('x', null, 3.131, new Integer(37))).lastResult()); in testVariableArity()
1565 ((VariableArityTester) mh.invoke( in testVariableArity()
1572 ((VariableArityTester) mh.invoke( in testVariableArity()
1584 (String) mh.invoke(Float.valueOf(9.99f), in testVariableArity()
1589 (String) mh.invoke(Float.valueOf(9.99f), Float.valueOf(0.0f), in testVariableArity()
1592 (String) mh.invoke(Float.valueOf(9.99f), 0.0f, 0.1f, 1.1f)); in testVariableArity()
1595 (String) mh.invoke(Float.valueOf(9.99f), 77, 33, 64)); in testVariableArity()
1621 (String) mh.invoke(vat, in testVariableArity()
1627 (String) mh.invoke(vat, Float.valueOf(9.99f), Float.valueOf(0.0f), in testVariableArity()
1633 assertEquals("[1, 2, 3]", (String) mh.invoke(vat, 1, 2, 3)); in testVariableArity()
1634 assertEquals("[1, 2, 3]", (Object) mh.invoke(vat, 1, 2, 3)); in testVariableArity()
1636 assertEquals("[1, 2, 3, 4]", (long) mh.invoke(vat, 1, 2, 3)); in testVariableArity()
1642 assertEquals(10l, (long) mh.invoke(1, 2, 3, 4)); in testVariableArity()
1643 assertEquals(Long.valueOf(10l), (Long) mh.invoke(1, 2, 3, 4)); in testVariableArity()
1646 Object o = mh.invoke(1, 2, 3, 4); in testVariableArity()
1647 long l = (long) mh.invoke(1, 2, 3, 4); in testVariableArity()
1648 assertEquals(10l, (long) mh.invoke(1, 2, 3, 4)); in testVariableArity()
1649 assertEquals(Long.valueOf(10l), (Long) mh.invoke(1, 2, 3, 4)); in testVariableArity()
1653 assertEquals(Long.valueOf(10l), (Byte) mh.invoke(1, 2, 3, 4)); in testVariableArity()
1659 byte b = (byte) mh.invoke(1, 2, 3, 4); in testVariableArity()
1666 assertEquals(null, (Object) mh.invoke(3, 2, 1)); in testVariableArity()
1667 assertEquals(0l, (long) mh.invoke(1, 2, 3)); in testVariableArity()
1677 assertEquals("[]", mh.invoke()); in testVariableArity()
1678 assertEquals("[true, false, true]", mh.invoke(true, false, true)); in testVariableArity()
1679 assertEquals("[true, false, true]", mh.invoke(new boolean[] { true, false, true})); in testVariableArity()
1680 assertEquals("[false, true]", mh.invoke(Boolean.valueOf(false), Boolean.valueOf(true))); in testVariableArity()
1682 mh.invoke(true, true, 0); in testVariableArity()
1695 assertEquals("[]", mh.invoke()); in testVariableArity_MethodHandles_bind()
1696 assertEquals("[true, false, true]", mh.invoke(true, false, true)); in testVariableArity_MethodHandles_bind()
1697 assertEquals("[true, false, true]", mh.invoke(new boolean[] { true, false, true})); in testVariableArity_MethodHandles_bind()
1698 assertEquals("[false, true]", mh.invoke(Boolean.valueOf(false), Boolean.valueOf(true))); in testVariableArity_MethodHandles_bind()
1701 mh.invoke(true, true, 0); in testVariableArity_MethodHandles_bind()
1827 invokeMethod.invoke(instance, new Object[] { new Object[] { Integer.valueOf(1) } } ); in testReflectiveCalls()
1886 .invoke(andthen); in testInterfaceSpecial()
1898 abstract_target.invoke(c3, "hello"); in testInterfaceSpecial()