Home
last modified time | relevance | path

Searched refs:invoke (Results 1 – 25 of 362) sorted by relevance

12345678910>>...15

/libcore/ojluni/annotations/hiddenapi/java/lang/invoke/
DMethodHandles.java26 package java.lang.invoke;
37 public static java.lang.invoke.MethodHandles.Lookup lookup() { in lookup()
41 public static java.lang.invoke.MethodHandles.Lookup publicLookup() { in publicLookup()
46 java.lang.Class<T> expected, java.lang.invoke.MethodHandle target) { in reflectAs()
50 private static java.lang.invoke.MethodHandleImpl getMethodHandleImpl( in getMethodHandleImpl()
51 java.lang.invoke.MethodHandle target) { in getMethodHandleImpl()
63 public static java.lang.invoke.MethodHandle arrayElementGetter(java.lang.Class<?> arrayClass) in arrayElementGetter()
100 public static java.lang.invoke.MethodHandle arrayElementSetter(java.lang.Class<?> arrayClass) in arrayElementSetter()
137 public static java.lang.invoke.VarHandle arrayElementVarHandle(java.lang.Class<?> arrayClass) in arrayElementVarHandle()
142 public static java.lang.invoke.VarHandle byteArrayViewVarHandle( in byteArrayViewVarHandle()
[all …]
/libcore/luni/src/test/java/libcore/java/lang/
DIntrinsicTest.java27 String.class.getMethod("charAt", int.class).invoke("hello", 0); in testString_charAt()
32 String.class.getMethod("compareTo", String.class).invoke("hello", "world"); in testString_compareTo()
37 String.class.getMethod("equals", Object.class).invoke("hello", "world"); in testString_equals()
42 String.class.getMethod("indexOf", int.class).invoke("hello", 'l'); in testString_fastIndexOf_II()
47 String.class.getMethod("isEmpty").invoke("hello"); in testString_isEmpty()
52 String.class.getMethod("length").invoke("hello"); in testString_length()
57 Math.class.getMethod("abs", int.class).invoke(null, 1); in testMath_abs()
59 Math.class.getMethod("abs", long.class).invoke(null, 1L); in testMath_abs()
61 Math.class.getMethod("abs", float.class).invoke(null, 1.0f); in testMath_abs()
63 Math.class.getMethod("abs", double.class).invoke(null, 1.0); in testMath_abs()
[all …]
/libcore/
Dnullability_warnings.txt1 WARNING: method java.lang.invoke.MethodType.appendParameterTypes(Class<?>...), return value, MISSING
2 WARNING: method java.lang.invoke.MethodType.appendParameterTypes(java.util.List<java.lang.Class<?>>…
3 WARNING: method java.lang.invoke.MethodType.appendParameterTypes(java.util.List<java.lang.Class<?>>…
4 WARNING: method java.lang.invoke.MethodType.changeParameterType(int, Class<?>), parameter nptype, M…
5 WARNING: method java.lang.invoke.MethodType.changeParameterType(int, Class<?>), return value, MISSI…
6 WARNING: method java.lang.invoke.MethodType.changeReturnType(Class<?>), parameter nrtype, MISSING
7 WARNING: method java.lang.invoke.MethodType.changeReturnType(Class<?>), return value, MISSING
8 WARNING: method java.lang.invoke.MethodType.dropParameterTypes(int, int), return value, MISSING
9 WARNING: method java.lang.invoke.MethodType.equals(Object), parameter x, MISSING
10 WARNING: method java.lang.invoke.MethodType.erase(), return value, MISSING
[all …]
/libcore/ojluni/annotations/sdk/nullability/java/lang/invoke/
DMethodType.annotated.java27 package java.lang.invoke;
30 …inal class MethodType implements java.lang.invoke.TypeDescriptor.OfMethod<java.lang.Class<?>,java.…
34 public static java.lang.invoke.MethodType methodType(java.lang.Class<?> rtype, java.lang.Class<?>[]… in methodType()
36 public static java.lang.invoke.MethodType methodType(java.lang.Class<?> rtype, java.util.List<java.… in methodType()
38 public static java.lang.invoke.MethodType methodType(java.lang.Class<?> rtype, java.lang.Class<?> p… in methodType()
40 public static java.lang.invoke.MethodType methodType(java.lang.Class<?> rtype) { throw new RuntimeE… in methodType()
42 public static java.lang.invoke.MethodType methodType(java.lang.Class<?> rtype, java.lang.Class<?> p… in methodType()
44 public static java.lang.invoke.MethodType methodType(java.lang.Class<?> rtype, java.lang.invoke.Met… in methodType()
46 public static java.lang.invoke.MethodType genericMethodType(int objectArgCount, boolean finalArray)… in genericMethodType()
48 public static java.lang.invoke.MethodType genericMethodType(int objectArgCount) { throw new Runtime… in genericMethodType()
[all …]
/libcore/ojluni/src/test/java/lang/invoke/
DVarArgsTest.java30 package test.java.lang.invoke;
32 import java.lang.invoke.MethodHandle;
33 import java.lang.invoke.MethodHandles;
34 import java.lang.invoke.MethodType;
37 import static java.lang.invoke.MethodHandles.*;
38 import static java.lang.invoke.MethodType.*;
54 assertEquals("[won]", (String) ts1.invoke(new Object[]{"won"})); in testWithVarargs()
55 assertEquals("[won]", (String) ts1.invoke("won")); in testWithVarargs()
56 assertEquals("[won, won]", (String) ts1.invoke("won", "won")); in testWithVarargs()
57 assertEquals("[won, won]", (String) ts1.invoke(new Object[]{"won", "won"})); in testWithVarargs()
[all …]
DConstantIdentityMHTest.java30 package test.java.lang.invoke;
32 import java.lang.invoke.MethodHandle;
33 import java.lang.invoke.MethodHandles;
34 import java.lang.invoke.MethodType;
36 import static java.lang.invoke.MethodHandles.*;
37 import static java.lang.invoke.MethodType.*;
73 assertEquals("xy", (String)cat.invoke("x","y")); in testEmpty()
75 assertEquals(null, (String)mhEmpty.invoke("x","y")); in testEmpty()
DSpreadCollectTest.java32 package test.java.lang.invoke;
35 import java.lang.invoke.MethodHandle;
36 import java.lang.invoke.MethodHandles;
37 import java.lang.invoke.MethodHandles.Lookup;
38 import java.lang.invoke.MethodType;
39 import java.lang.invoke.WrongMethodTypeException;
42 import static java.lang.invoke.MethodType.methodType;
59 assertEquals("A456B", (String) spreader.invoke("A", new int[]{4, 5, 6}, "B")); in testAsSpreader()
69 assertTrue((int) compare2FromArray.invoke(Arrays.copyOfRange(ints, 0, 2), cmp) < 0); in testAsSpreaderExample()
70 assertTrue((int) compare2FromArray.invoke(Arrays.copyOfRange(ints, 1, 3), cmp) > 0); in testAsSpreaderExample()
[all …]
DPermuteArgsReturnVoidTest.java31 package test.java.lang.invoke;
36 import java.lang.invoke.MethodHandle;
37 import java.lang.invoke.MethodHandles;
38 import java.lang.invoke.MethodType;
40 import static java.lang.invoke.MethodHandles.dropArguments;
41 import static java.lang.invoke.MethodHandles.identity;
67 String s = (String) p.invoke("IN", 0, 0); in testReturnOnStack()
86 String s = (String) p.invoke("IN", 0, 0); in testReturnFromArg()
DFoldTest.java31 package test.java.lang.invoke;
34 import java.lang.invoke.MethodHandle;
35 import java.lang.invoke.MethodHandles;
36 import java.lang.invoke.MethodHandles.Lookup;
37 import java.lang.invoke.MethodType;
39 import static java.lang.invoke.MethodType.methodType;
57 assertEquals(720, (int) fold.invoke(3, 4, 5)); in testFold0a()
65 assertEquals(540, (int) fold.invoke(3, 4, 5)); in testFold1a()
73 assertEquals(23, (int) fold.invoke("true", true, 23)); in testFold0b()
81 assertEquals(1, (int) fold.invoke(true, true, 1)); in testFold1b()
[all …]
DArrayLengthTest.java29 package test.java.lang.invoke;
31 import java.lang.invoke.MethodHandle;
32 import java.lang.invoke.MethodHandles;
61 Object array = MethodHandles.arrayConstructor(arrayClass).invoke(10); in testArrayLength()
62 assertEquals(10, arrayLength.invoke(array)); in testArrayLength()
68 arrayLength.invoke(null); in testArrayLengthInvokeNPE()
DArrayConstructorTest.java30 package test.java.lang.invoke;
32 import java.lang.invoke.MethodHandle;
33 import java.lang.invoke.MethodHandles;
35 import static java.lang.invoke.MethodType.methodType;
87 String[] a = (String[]) h.invoke(17); in testArrayConstructor()
95 h.invoke(-1); // throws exception in testArrayConstructorNegativeIndex()
DJavaDocExamplesTest.java30 package test.java.lang.invoke;
33 import java.lang.invoke.*;
34 import static java.lang.invoke.MethodHandles.*;
35 import static java.lang.invoke.MethodType.*;
129 assertEquals("[x, y]", MH_asList.invoke("x", "y").toString()); in testFindStatic()
147 assertEquals("def", MH_subSequence.invoke("abcdefghi", 3, 6).toString()); in testFindVirtual()
171 MH_newProcessBuilder.invoke("x", "y", "z"); in testFindConstructor()
298 assertEquals("xy", h3.invoke("x", "y", 1, "a", "b", "c")); in testDropArgumentsToMatch()
388 x = mh.invoke("one", "two"); in testMethodHandlesSummary()
497 assertEquals("[won]", (String) ts1.invoke( new Object[]{"won"})); in testAsVarargsCollector()
[all …]
DTryFinallyTest.java31 package test.java.lang.invoke;
33 import java.lang.invoke.MethodHandle;
34 import java.lang.invoke.MethodHandles;
35 import java.lang.invoke.MethodHandles.Lookup;
36 import java.lang.invoke.MethodType;
38 import static java.lang.invoke.MethodType.methodType;
55 assertEquals("Hello, world!", hello.invoke("world")); in testTryFinally()
80 assertEquals(arg, tryFinally.invoke(arg)); in testTryFinally()
90 tryFinally.invoke(arg); // should throw in testTryFinallyException()
97 tfVoid.invoke("world"); in testTryFinallyVoid()
[all …]
/libcore/ojluni/src/test/java/util/Arrays/
DSortingHelper.java28 import java.lang.invoke.MethodHandle;
29 import java.lang.invoke.MethodHandles;
72 MethodHandleHolder.INT_SORT.invoke( in sort()
75 MethodHandleHolder.LONG_SORT.invoke( in sort()
78 MethodHandleHolder.BYTE_SORT.invoke( in sort()
81 MethodHandleHolder.CHAR_SORT.invoke( in sort()
84 MethodHandleHolder.SHORT_SORT.invoke( in sort()
87 MethodHandleHolder.FLOAT_SORT.invoke( in sort()
90 MethodHandleHolder.DOUBLE_SORT.invoke( in sort()
130 MethodHandleHolder.INT_SORT.invoke( in sort()
[all …]
/libcore/toolchainapi/api/
Dcurrent.txt2 package java.lang.invoke {
6 ….invoke.CallSite altMetafactory(java.lang.invoke.MethodHandles.Lookup, String, java.lang.invoke.Me…
7invoke.CallSite metafactory(java.lang.invoke.MethodHandles.Lookup, String, java.lang.invoke.Method…
/libcore/luni/src/test/java/libcore/java/lang/invoke/
DMethodHandleCombinersTest.java17 package libcore.java.lang.invoke;
20 import java.lang.invoke.MethodHandle;
21 import java.lang.invoke.MethodHandles;
22 import java.lang.invoke.MethodType;
23 import java.lang.invoke.WrongMethodTypeException;
44 handle.invoke(iae); in testThrowException()
74 transform.invoke(45, new Object(), "foo", 42l); in testDropArguments()
79 transform.invoke("foo", 45, new Object(), 42l); in testDropArguments()
84 transform.invoke("foo", 42l, 45, new Object()); in testDropArguments()
89 transform.invoke("foo", 42l, 45l, new Object()); in testDropArguments()
[all …]
DMethodHandlesTest.java17 package libcore.java.lang.invoke;
21 import java.lang.invoke.MethodHandle;
22 import java.lang.invoke.MethodHandleInfo;
23 import java.lang.invoke.MethodHandles;
24 import java.lang.invoke.MethodHandles.Lookup;
25 import java.lang.invoke.MethodType;
26 import java.lang.invoke.WrongMethodTypeException;
38 import static java.lang.invoke.MethodHandles.Lookup.*;
363 mh1.invoke(bInstance); in testfindSpecial_invokeSuperBehaviour()
369 mh1.invoke(new A()); in testfindSpecial_invokeSuperBehaviour()
[all …]
DMethodHandleAccessorsTest.java17 package libcore.java.lang.invoke;
21 import java.lang.invoke.MethodHandle;
22 import java.lang.invoke.MethodHandles;
23 import java.lang.invoke.WrongMethodTypeException;
761 h0.invoke(); in testStaticGetter()
762 Number t = (Number)h0.invoke(); in testStaticGetter()
763 int u = (int)h0.invoke(); in testStaticGetter()
764 Integer v = (Integer)h0.invoke(); in testStaticGetter()
765 long w = (long)h0.invoke(); in testStaticGetter()
767 byte x = (byte)h0.invoke(); in testStaticGetter()
[all …]
/libcore/ojluni/src/main/java/java/lang/constant/
DDirectMethodHandleDesc.java27 import java.lang.invoke.MethodHandle;
28 import java.lang.invoke.MethodHandleInfo;
34 import static java.lang.invoke.MethodHandleInfo.REF_getField;
35 import static java.lang.invoke.MethodHandleInfo.REF_getStatic;
36 import static java.lang.invoke.MethodHandleInfo.REF_invokeInterface;
37 import static java.lang.invoke.MethodHandleInfo.REF_invokeSpecial;
38 import static java.lang.invoke.MethodHandleInfo.REF_invokeStatic;
39 import static java.lang.invoke.MethodHandleInfo.REF_invokeVirtual;
40 import static java.lang.invoke.MethodHandleInfo.REF_newInvokeSpecial;
41 import static java.lang.invoke.MethodHandleInfo.REF_putField;
[all …]
DConstantDesc.java28 import java.lang.invoke.MethodHandle;
29 import java.lang.invoke.MethodHandles;
30 import java.lang.invoke.MethodType;
31 import java.lang.invoke.VarHandle.VarHandleDesc;
/libcore/ojluni/src/test/java/lang/StackWalker/
DReflectionFrames.java36 import java.lang.invoke.MethodHandle;
37 import java.lang.invoke.MethodHandles;
38 import java.lang.invoke.MethodHandles.Lookup;
39 import java.lang.invoke.MethodType;
92 .invoke(null, How.NEW)); in testNewStackInspector()
114 .invoke(null, How.NEW)); in testNewStackInspector()
138 .invoke(null, How.NEW)); in testNewStackInspector()
166 .invoke(null, How.NEW)); in testNewStackInspector()
193 .invoke(null, How.NEW)); in testNewStackInspector()
224 .invoke(null, How.NEW)); in testNewStackInspector()
[all …]
DLocalsAndOperands.java105 extendedWalker = (StackWalker) getExtendedWalker.invoke(null,
129 return (Object[]) getLocals.invoke(arg); in invokeGetLocals()
214 StackWalker sw = (StackWalker) getExtendedWalker.invoke(null, in fullStackSanityCheck()
223 ((Object[]) getLocals.invoke(f)).length + " locals, " + in fullStackSanityCheck()
224 ((Object[]) getOperands.invoke(f)).length + " operands, " + in fullStackSanityCheck()
225 ((Object[]) getMonitors.invoke(f)).length + " monitors"); in fullStackSanityCheck()
355 Object[] locals = (Object[]) getLocals.invoke(frames[0]); in usedLong()
379 final Object[] locals = (Object[]) getLocals.invoke(frames[0]); in unusedLong()
402 Object[] locals = (Object[]) getLocals.invoke(frames[0]); in usedDouble()
436 Object[] locals = (Object[]) getLocals.invoke(frame); in printLocals()
[all …]
/libcore/ojluni/src/test/java/lang/invoke/MethodHandles/
DTestDropReturn.java25 package test.java.lang.invoke.MethodHandles;
36 import java.lang.invoke.MethodHandle;
37 import java.lang.invoke.MethodHandles;
39 import static java.lang.invoke.MethodType.methodType;
48 Object x = mh.invoke(testValue); in testDropReturn()
53 mh.invoke(testValue); // should at least work in testDropReturn()
/libcore/ojluni/src/test/java/lang/invoke/VarHandles/
DVarHandleTestReflection.java25 package test.java.lang.invoke.VarHandles;
35 import java.lang.invoke.MethodHandle;
36 import java.lang.invoke.MethodHandleInfo;
37 import java.lang.invoke.MethodHandles;
38 import java.lang.invoke.VarHandle;
64 vhm.invoke(v, new Object[]{}); in methodInvocation()
77 Object o = (Object) mh.invoke(v, new Object[]{}); in methodHandleInvoke()
91 im.invoke(v, new Object[]{}); in methodInvocationFromMethodInfo()
/libcore/ojluni/src/test/java/lang/invoke/remote/
DRemoteExample.java23 package test.java.lang.invoke.remote;
25 import java.lang.invoke.MethodHandles;
26 import java.lang.invoke.MethodHandles.Lookup;
27 import test.java.lang.invoke.MethodHandlesTest;

12345678910>>...15