• Home
  • Raw
  • Download

Lines Matching refs:name

87     configMessage = "parentDomain=" + parentDomain.name() + ", childDomain=" + childDomain.name()  in runTest()
141 String suffix = (isStatic ? "Static" : "") + hiddenness.name(); in runTest()
146 String baseName = visibility.name() + suffix; in runTest()
158 String name = "method" + visibility.name() + "Default" + hiddenness.name(); in runTest() local
159 checkMethod(ParentInterface.class, name, /*isStatic*/ false, visibility, expected, in runTest()
171 checkNullaryConstructor(Class.forName("NullaryConstructor" + hiddenness.name()), expected); in runTest()
184 private static void checkMemberCallback(Class<?> klass, String name, in checkMemberCallback() argument
192 klass.getField(name); in checkMemberCallback()
194 klass.getMethod(name); in checkMemberCallback()
198 klass.getDeclaredField(name); in checkMemberCallback()
200 klass.getDeclaredMethod(name); in checkMemberCallback()
209 consumer.recordedValue.contains(name); in checkMemberCallback()
212 throw new RuntimeException("Expected callback for member: " + name); in checkMemberCallback()
214 throw new RuntimeException("Did not expect callback for member: " + name); in checkMemberCallback()
222 private static void checkField(Class<?> klass, String name, boolean isStatic, in checkField() argument
236 if (Reflection.canDiscoverWithGetDeclaredField(klass, name) != canDiscover) { in checkField()
237 throwDiscoveryException(klass, name, true, "getDeclaredField()", canDiscover); in checkField()
240 if (Reflection.canDiscoverWithGetDeclaredFields(klass, name) != canDiscover) { in checkField()
241 throwDiscoveryException(klass, name, true, "getDeclaredFields()", canDiscover); in checkField()
244 if (Reflection.canDiscoverWithGetField(klass, name) != (canDiscover && isPublic)) { in checkField()
245 throwDiscoveryException(klass, name, true, "getField()", (canDiscover && isPublic)); in checkField()
248 if (Reflection.canDiscoverWithGetFields(klass, name) != (canDiscover && isPublic)) { in checkField()
249 throwDiscoveryException(klass, name, true, "getFields()", (canDiscover && isPublic)); in checkField()
254 if (JNI.canDiscoverField(klass, name, isStatic) != canDiscover) { in checkField()
255 throwDiscoveryException(klass, name, true, "JNI", canDiscover); in checkField()
262 if (JLI.canDiscoverWithLookupFindGetter(lookup, klass, name, int.class) in checkField()
264 throwDiscoveryException(klass, name, true, "MethodHandles.lookup().findGetter()", in checkField()
267 if (JLI.canDiscoverWithLookupFindStaticGetter(lookup, klass, name, int.class) in checkField()
269 throwDiscoveryException(klass, name, true, "MethodHandles.lookup().findStaticGetter()", in checkField()
278 if (JLI.canDiscoverWithLookupFindSetter(publicLookup, klass, name, int.class) in checkField()
280 throwDiscoveryException(klass, name, true, "MethodHandles.publicLookup().findSetter()", in checkField()
283 if (JLI.canDiscoverWithLookupFindStaticSetter(publicLookup, klass, name, int.class) in checkField()
285 throwDiscoveryException(klass, name, true, "MethodHandles.publicLookup().findStaticSetter()", in checkField()
293 if (Reflection.canDiscoverFieldWithMetaReflection(klass, name, true) != canDiscover) { in checkField()
294 throwDiscoveryException(klass, name, false, in checkField()
300 if (Reflection.canDiscoverFieldWithMetaReflection(klass, name, false) != true) { in checkField()
301 throwDiscoveryException(klass, name, false, in checkField()
309 if (Reflection.canObserveFieldHiddenAccessFlags(klass, name)) { in checkField()
310 throwModifiersException(klass, name, true); in checkField()
315 if (!Reflection.canGetField(klass, name)) { in checkField()
316 throwAccessException(klass, name, true, "Field.getInt()"); in checkField()
318 if (!Reflection.canSetField(klass, name)) { in checkField()
319 throwAccessException(klass, name, true, "Field.setInt()"); in checkField()
321 if (!JNI.canGetField(klass, name, isStatic)) { in checkField()
322 throwAccessException(klass, name, true, "getIntField"); in checkField()
324 if (!JNI.canSetField(klass, name, isStatic)) { in checkField()
325 throwAccessException(klass, name, true, "setIntField"); in checkField()
330 checkMemberCallback(klass, name, isPublic, true /* isField */, invokesMemberCallback); in checkField()
333 private static void checkMethod(Class<?> klass, String name, boolean isStatic, in checkMethod() argument
347 if (Reflection.canDiscoverWithGetDeclaredMethod(klass, name) != canDiscover) { in checkMethod()
348 throwDiscoveryException(klass, name, false, "getDeclaredMethod()", canDiscover); in checkMethod()
351 if (Reflection.canDiscoverWithGetDeclaredMethods(klass, name) != canDiscover) { in checkMethod()
352 throwDiscoveryException(klass, name, false, "getDeclaredMethods()", canDiscover); in checkMethod()
355 if (Reflection.canDiscoverWithGetMethod(klass, name) != (canDiscover && isPublic)) { in checkMethod()
356 throwDiscoveryException(klass, name, false, "getMethod()", (canDiscover && isPublic)); in checkMethod()
359 if (Reflection.canDiscoverWithGetMethods(klass, name) != (canDiscover && isPublic)) { in checkMethod()
360 throwDiscoveryException(klass, name, false, "getMethods()", (canDiscover && isPublic)); in checkMethod()
365 if (JNI.canDiscoverMethod(klass, name, isStatic) != canDiscover) { in checkMethod()
366 throwDiscoveryException(klass, name, false, "JNI", canDiscover); in checkMethod()
373 if (JLI.canDiscoverWithLookupFindVirtual(lookup, klass, name, methodType) != canDiscover) { in checkMethod()
374 throwDiscoveryException(klass, name, false, "MethodHandles.lookup().findVirtual()", in checkMethod()
378 if (JLI.canDiscoverWithLookupFindStatic(lookup, klass, name, methodType) != canDiscover) { in checkMethod()
379 throwDiscoveryException(klass, name, false, "MethodHandles.lookup().findStatic()", in checkMethod()
387 if (Reflection.canDiscoverMethodWithMetaReflection(klass, name, true) != canDiscover) { in checkMethod()
388 throwDiscoveryException(klass, name, false, in checkMethod()
394 if (Reflection.canDiscoverMethodWithMetaReflection(klass, name, false) != true) { in checkMethod()
395 throwDiscoveryException(klass, name, false, in checkMethod()
405 if (Reflection.canObserveMethodHiddenAccessFlags(klass, name)) { in checkMethod()
406 throwModifiersException(klass, name, false); in checkMethod()
411 if (!Reflection.canInvokeMethod(klass, name)) { in checkMethod()
412 throwAccessException(klass, name, false, "invoke()"); in checkMethod()
414 if (!JNI.canInvokeMethodA(klass, name, isStatic)) { in checkMethod()
415 throwAccessException(klass, name, false, "CallMethodA"); in checkMethod()
417 if (!JNI.canInvokeMethodV(klass, name, isStatic)) { in checkMethod()
418 throwAccessException(klass, name, false, "CallMethodV"); in checkMethod()
424 checkMemberCallback(klass, name, isPublic, false /* isField */, invokesMemberCallback); in checkMethod()
535 private static void throwDiscoveryException(Class<?> klass, String name, boolean isField, in throwDiscoveryException() argument
538 "." + name + " to " + (canAccess ? "" : "not ") + "be discoverable with " + fn + ". " + in throwDiscoveryException()
542 private static void throwAccessException(Class<?> klass, String name, boolean isField, in throwAccessException() argument
545 klass.getName() + "." + name + " using " + fn + ". " + configMessage); in throwAccessException()
548 private static void throwModifiersException(Class<?> klass, String name, boolean isField) { in throwModifiersException() argument
550 "." + name + " to not expose hidden modifiers"); in throwModifiersException()