Home
last modified time | relevance | path

Searched refs:getter (Results 1 – 6 of 6) sorted by relevance

/libcore/ojluni/src/test/java/lang/reflect/records/
DCheckEqualityIsBasedOnFields.java119 Method getter, equalsMethod; in testEqualsDoesntUseAccessors() local
122 getter = clazz.getMethod("x"); in testEqualsDoesntUseAccessors()
130 assertEquals(getter.invoke(rec1), getter.invoke(rec2)); in testEqualsDoesntUseAccessors()
/libcore/ojluni/src/main/java/java/lang/runtime/
DObjectMethods.java217 for (MethodHandle getter : getters) { in makeEquals()
218 MethodHandle equalator = equalator(getter.type().returnType()); // (TT)Z in makeEquals()
219 …MethodHandle thisFieldEqual = MethodHandles.filterArguments(equalator, 0, getter, getter); // (RR)Z in makeEquals()
239 for (MethodHandle getter : getters) { in makeHashCode()
240 MethodHandle hasher = hasher(getter.type().returnType()); // (T)I in makeHashCode()
241 … MethodHandle hashThisField = MethodHandles.filterArguments(hasher, 0, getter); // (R)I in makeHashCode()
272 MethodHandle getter = getters.get(i); // (R)T in makeToString() local
273 MethodHandle stringify = stringifier(getter.type().returnType()); // (T)String in makeToString()
274 …MethodHandle stringifyThisField = MethodHandles.filterArguments(stringify, 0, getter); // (R)St… in makeToString()
/libcore/luni/src/test/java/libcore/java/lang/invoke/
DMethodHandleCombinersTest.java293 MethodHandle getter = MethodHandles.arrayElementGetter(int[].class); in testArrayElementGetter() local
298 int value = (int) getter.invoke(array, 0); in testArrayElementGetter()
302 value = (int) getter.invoke(array, -1); in testArrayElementGetter()
308 value = (int) getter.invoke(null, -1); in testArrayElementGetter()
315 getter = MethodHandles.arrayElementGetter(long[].class); in testArrayElementGetter()
318 long value = (long) getter.invoke(array, 0); in testArrayElementGetter()
323 getter = MethodHandles.arrayElementGetter(short[].class); in testArrayElementGetter()
326 short value = (short) getter.invoke(array, 0); in testArrayElementGetter()
331 getter = MethodHandles.arrayElementGetter(char[].class); in testArrayElementGetter()
334 char value = (char) getter.invoke(array, 0); in testArrayElementGetter()
[all …]
/libcore/luni/src/test/java/crossvmtest/java/lang/
DRecordComponentTest.java68 Method getter = components[0].getAccessor(); in testGetAccessor() local
71 assertEquals(9, getter.invoke(a)); in testGetAccessor()
/libcore/ojluni/src/test/java/nio/Buffer/
DEqualsCompareTest.java94 final MethodHandle getter; field in EqualsCompareTest.BufferType
108getter = lookup.findVirtual(bufferType, "get", MethodType.methodType(elementType, int.class)); in BufferType()
136 return (E) getter.invoke(a, i); in get()
/libcore/ojluni/src/test/java/util/Arrays/
DArraysEqCmpTest.java91 final MethodHandle getter; field in ArraysEqCmpTest.ArrayType
107 getter = MethodHandles.arrayElementGetter(arrayType); in ArrayType()
198 return (Object) getter.invoke(a, i); in get()