/libcore/luni/src/test/java/libcore/java/lang/invoke/ |
D | ExplicitCastArgumentsTest.java | 151 MethodHandle mh = explicitCastArgumentToIdentity(Child.class, Parent.class); in explicitCastArgumentParentToChild() local 153 Child c = (Child) mh.invokeExact(new Parent()); in explicitCastArgumentParentToChild() 160 MethodHandle mh = explicitCastArgumentToIdentity(Child.class, Parent.class); in explicitCastArgumentNullParentToChild() local 161 Child c = (Child) mh.invokeExact((Parent) null); in explicitCastArgumentNullParentToChild() 167 MethodHandle mh = explicitCastArgumentToIdentity(Parent.class, Child.class); in explicitCastArgumentChildToParent() local 168 Parent p = (Parent) mh.invokeExact(new Child()); in explicitCastArgumentChildToParent() 174 MethodHandle mh = explicitCastArgumentToIdentity(Parent.class, Child.class); in explicitCastArgumentNullChildToParent() local 175 Parent p = (Parent) mh.invokeExact((Child) null); in explicitCastArgumentNullChildToParent() 181 MethodHandle mh = explicitCastReturnValueFromIdentity(Parent.class, Child.class); in explicitCastReturnValueNullParentToChild() local 182 Child c = (Child) mh.invokeExact((Parent) null); in explicitCastReturnValueNullParentToChild() [all …]
|
D | MethodHandlesTest.java | 383 MethodHandle mh = MethodHandles.lookup().findSpecial(F.class /* refC */, "callInner", in testfindSpecial_invokeSuperInterfaceBehaviour() local 387 mh.invokeExact(g, oc); in testfindSpecial_invokeSuperInterfaceBehaviour() 537 MethodHandle mh = BarImpl.lookup.findVirtual( in testfindVirtual() local 539 String str = (String) mh.invoke(new BarImpl()); in testfindVirtual() 544 mh = MethodHandles.lookup().findVirtual(BarImpl.class, "foo", in testfindVirtual() 546 str = (String) mh.invoke(new BarImpl()); in testfindVirtual() 558 mh = MethodHandles.lookup().findVirtual( in testfindVirtual() 568 mh = MethodHandles.lookup().findVirtual(BarImpl.class, "bar", in testfindVirtual() 570 str = (String) mh.invoke(new BarImpl()); in testfindVirtual() 574 mh = MethodHandles.lookup().findVirtual(BarImpl.class, "bar", in testfindVirtual() [all …]
|
D | MethodHandleCombinersTest.java | 1675 private static void invokeMultiThreaded(final MethodHandle mh) throws Throwable { in invokeMultiThreaded() argument 1687 mh.invoke(); in invokeMultiThreaded() 1714 MethodHandle mh = MethodHandles.dropArguments(delegate, 0, int.class, Object.class); in testDropInsertArgumentsMultithreaded() local 1715 mh = MethodHandles.insertArguments(mh, 0, 3333, "bogon", "foo", 42); in testDropInsertArgumentsMultithreaded() 1716 invokeMultiThreaded(mh); in testDropInsertArgumentsMultithreaded() 1743 private static void testTargetAndFallback_delegate(MethodHandle mh) throws Throwable { in testTargetAndFallback_delegate() argument 1744 String actual = (String) mh.invoke("target", 42, 56); in testTargetAndFallback_delegate() 1746 actual = (String) mh.invoke("blah", 41, 56); in testTargetAndFallback_delegate() 1788 MethodHandle mh = MethodHandles.lookup().findStatic( in testReferenceArrayGetterMultiThreaded() local 1792 mh = MethodHandles.insertArguments(mh, 0, getter, setter, in testReferenceArrayGetterMultiThreaded() [all …]
|
D | CallSitesTest.java | 36 final MethodHandle mh = in test_ConstantCallSite() local 38 final ConstantCallSite site = new ConstantCallSite(mh); in test_ConstantCallSite() 39 assertEquals(mh, site.getTarget()); in test_ConstantCallSite() 45 site.setTarget(mh); in test_ConstantCallSite()
|
D | MethodHandleAccessorsTest.java | 722 MethodHandle mh = lookup.findStaticGetter(ValueHolder.class, "s_fi", int.class); in testLookup() local 723 int initialValue = (int)mh.invokeExact(); in testLookup() 727 MethodHandle mh = lookup.findStaticSetter(ValueHolder.class, "s_i", int.class); in testLookup() local 728 mh.invokeExact(0); in testLookup()
|
/libcore/ojluni/src/main/java/java/lang/invoke/ |
D | MethodHandle.java | 888 MethodHandle mh = duplicate(); in asTypeUncached() local 889 mh.nominalType = newType; in asTypeUncached() 890 return mh; in asTypeUncached() 1380 MethodHandle mh = this; in asFixedArity() local 1381 if (mh.isVarargsCollector()) { in asFixedArity() 1382 mh = ((Transformers.VarargsCollector) mh).asFixedArity(); in asFixedArity() 1384 assert(!mh.isVarargsCollector()); in asFixedArity() 1385 return mh; in asFixedArity()
|
D | MethodHandles.java | 813 MethodHandle mh = new MethodHandleImpl(method.getArtMethod(), handleKind, methodType); in createMethodHandle() local 815 return new Transformers.VarargsCollector(mh); in createMethodHandle() 817 return mh; in createMethodHandle() 896 MethodHandle mh = findVirtualForMH(name, type); in findVirtual() local 897 if (mh != null) { in findVirtual() 898 return mh; in findVirtual() 902 MethodHandle mh = findVirtualForVH(name, type); in findVirtual() local 903 if (mh != null) { in findVirtual() 904 return mh; in findVirtual() 1000 MethodHandle mh; in createMethodHandleForConstructor() local [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/xml/parsers/ |
D | SAXParserFactoryTest.java | 233 MyHandler mh = new MyHandler(); in test_setNamespaceAwareZ() local 237 spf.newSAXParser().parse(is, mh); in test_setNamespaceAwareZ() 242 spf.newSAXParser().parse(is, mh); in test_setNamespaceAwareZ()
|