Lines Matching refs:name
87 configMessage = "parentDomain=" + parentDomain.name() + ", childDomain=" + childDomain.name() in runTest()
140 String suffix = (isStatic ? "Static" : "") + hiddenness.name(); in runTest()
145 String baseName = visibility.name() + suffix; in runTest()
157 String name = "method" + visibility.name() + "Default" + hiddenness.name(); in runTest() local
158 checkMethod(ParentInterface.class, name, /*isStatic*/ false, visibility, expected, in runTest()
170 checkNullaryConstructor(Class.forName("NullaryConstructor" + hiddenness.name()), expected); in runTest()
183 private static void checkMemberCallback(Class<?> klass, String name, in checkMemberCallback() argument
191 klass.getField(name); in checkMemberCallback()
193 klass.getMethod(name); in checkMemberCallback()
197 klass.getDeclaredField(name); in checkMemberCallback()
199 klass.getDeclaredMethod(name); in checkMemberCallback()
208 consumer.recordedValue.contains(name); in checkMemberCallback()
211 throw new RuntimeException("Expected callback for member: " + name); in checkMemberCallback()
213 throw new RuntimeException("Did not expect callback for member: " + name); in checkMemberCallback()
221 private static void checkField(Class<?> klass, String name, boolean isStatic, in checkField() argument
235 if (Reflection.canDiscoverWithGetDeclaredField(klass, name) != canDiscover) { in checkField()
236 throwDiscoveryException(klass, name, true, "getDeclaredField()", canDiscover); in checkField()
239 if (Reflection.canDiscoverWithGetDeclaredFields(klass, name) != canDiscover) { in checkField()
240 throwDiscoveryException(klass, name, true, "getDeclaredFields()", canDiscover); in checkField()
243 if (Reflection.canDiscoverWithGetField(klass, name) != (canDiscover && isPublic)) { in checkField()
244 throwDiscoveryException(klass, name, true, "getField()", (canDiscover && isPublic)); in checkField()
247 if (Reflection.canDiscoverWithGetFields(klass, name) != (canDiscover && isPublic)) { in checkField()
248 throwDiscoveryException(klass, name, true, "getFields()", (canDiscover && isPublic)); in checkField()
253 if (JNI.canDiscoverField(klass, name, isStatic) != canDiscover) { in checkField()
254 throwDiscoveryException(klass, name, true, "JNI", canDiscover); in checkField()
261 if (JLI.canDiscoverWithLookupFindGetter(lookup, klass, name, int.class) in checkField()
263 throwDiscoveryException(klass, name, true, "MethodHandles.lookup().findGetter()", in checkField()
266 if (JLI.canDiscoverWithLookupFindStaticGetter(lookup, klass, name, int.class) in checkField()
268 throwDiscoveryException(klass, name, true, "MethodHandles.lookup().findStaticGetter()", in checkField()
277 if (JLI.canDiscoverWithLookupFindSetter(publicLookup, klass, name, int.class) in checkField()
279 throwDiscoveryException(klass, name, true, "MethodHandles.publicLookup().findSetter()", in checkField()
282 if (JLI.canDiscoverWithLookupFindStaticSetter(publicLookup, klass, name, int.class) in checkField()
284 throwDiscoveryException(klass, name, true, "MethodHandles.publicLookup().findStaticSetter()", in checkField()
292 if (Reflection.canDiscoverFieldWithMetaReflection(klass, name, true) != canDiscover) { in checkField()
293 throwDiscoveryException(klass, name, false, in checkField()
299 if (Reflection.canDiscoverFieldWithMetaReflection(klass, name, false) != true) { in checkField()
300 throwDiscoveryException(klass, name, false, in checkField()
308 if (Reflection.canObserveFieldHiddenAccessFlags(klass, name)) { in checkField()
309 throwModifiersException(klass, name, true); in checkField()
314 if (!Reflection.canGetField(klass, name)) { in checkField()
315 throwAccessException(klass, name, true, "Field.getInt()"); in checkField()
317 if (!Reflection.canSetField(klass, name)) { in checkField()
318 throwAccessException(klass, name, true, "Field.setInt()"); in checkField()
320 if (!JNI.canGetField(klass, name, isStatic)) { in checkField()
321 throwAccessException(klass, name, true, "getIntField"); in checkField()
323 if (!JNI.canSetField(klass, name, isStatic)) { in checkField()
324 throwAccessException(klass, name, true, "setIntField"); in checkField()
329 checkMemberCallback(klass, name, isPublic, true /* isField */, invokesMemberCallback); in checkField()
332 private static void checkMethod(Class<?> klass, String name, boolean isStatic, in checkMethod() argument
346 if (Reflection.canDiscoverWithGetDeclaredMethod(klass, name) != canDiscover) { in checkMethod()
347 throwDiscoveryException(klass, name, false, "getDeclaredMethod()", canDiscover); in checkMethod()
350 if (Reflection.canDiscoverWithGetDeclaredMethods(klass, name) != canDiscover) { in checkMethod()
351 throwDiscoveryException(klass, name, false, "getDeclaredMethods()", canDiscover); in checkMethod()
354 if (Reflection.canDiscoverWithGetMethod(klass, name) != (canDiscover && isPublic)) { in checkMethod()
355 throwDiscoveryException(klass, name, false, "getMethod()", (canDiscover && isPublic)); in checkMethod()
358 if (Reflection.canDiscoverWithGetMethods(klass, name) != (canDiscover && isPublic)) { in checkMethod()
359 throwDiscoveryException(klass, name, false, "getMethods()", (canDiscover && isPublic)); in checkMethod()
364 if (JNI.canDiscoverMethod(klass, name, isStatic) != canDiscover) { in checkMethod()
365 throwDiscoveryException(klass, name, false, "JNI", canDiscover); in checkMethod()
372 if (JLI.canDiscoverWithLookupFindVirtual(lookup, klass, name, methodType) != canDiscover) { in checkMethod()
373 throwDiscoveryException(klass, name, false, "MethodHandles.lookup().findVirtual()", in checkMethod()
377 if (JLI.canDiscoverWithLookupFindStatic(lookup, klass, name, methodType) != canDiscover) { in checkMethod()
378 throwDiscoveryException(klass, name, false, "MethodHandles.lookup().findStatic()", in checkMethod()
386 if (Reflection.canDiscoverMethodWithMetaReflection(klass, name, true) != canDiscover) { in checkMethod()
387 throwDiscoveryException(klass, name, false, in checkMethod()
393 if (Reflection.canDiscoverMethodWithMetaReflection(klass, name, false) != true) { in checkMethod()
394 throwDiscoveryException(klass, name, false, in checkMethod()
404 if (Reflection.canObserveMethodHiddenAccessFlags(klass, name)) { in checkMethod()
405 throwModifiersException(klass, name, false); in checkMethod()
410 if (!Reflection.canInvokeMethod(klass, name)) { in checkMethod()
411 throwAccessException(klass, name, false, "invoke()"); in checkMethod()
413 if (!JNI.canInvokeMethodA(klass, name, isStatic)) { in checkMethod()
414 throwAccessException(klass, name, false, "CallMethodA"); in checkMethod()
416 if (!JNI.canInvokeMethodV(klass, name, isStatic)) { in checkMethod()
417 throwAccessException(klass, name, false, "CallMethodV"); in checkMethod()
423 checkMemberCallback(klass, name, isPublic, false /* isField */, invokesMemberCallback); in checkMethod()
534 private static void throwDiscoveryException(Class<?> klass, String name, boolean isField, in throwDiscoveryException() argument
537 "." + name + " to " + (canAccess ? "" : "not ") + "be discoverable with " + fn + ". " + in throwDiscoveryException()
541 private static void throwAccessException(Class<?> klass, String name, boolean isField, in throwAccessException() argument
544 klass.getName() + "." + name + " using " + fn + ". " + configMessage); in throwAccessException()
547 private static void throwModifiersException(Class<?> klass, String name, boolean isField) { in throwModifiersException() argument
549 "." + name + " to not expose hidden modifiers"); in throwModifiersException()