equal
deleted
inserted
replaced
295 * reference of a given reference class, is really visible to that class. |
295 * reference of a given reference class, is really visible to that class. |
296 * @param type the supposed type of a member or symbolic reference of refc |
296 * @param type the supposed type of a member or symbolic reference of refc |
297 * @param refc the class attempting to make the reference |
297 * @param refc the class attempting to make the reference |
298 */ |
298 */ |
299 public static boolean isTypeVisible(java.lang.invoke.MethodType type, Class<?> refc) { |
299 public static boolean isTypeVisible(java.lang.invoke.MethodType type, Class<?> refc) { |
300 for (int n = -1, max = type.parameterCount(); n < max; n++) { |
300 if (!isTypeVisible(type.returnType(), refc)) { |
301 Class<?> ptype = (n < 0 ? type.returnType() : type.parameterType(n)); |
301 return false; |
302 if (!isTypeVisible(ptype, refc)) |
302 } |
|
303 for (int n = 0, max = type.parameterCount(); n < max; n++) { |
|
304 if (!isTypeVisible(type.parameterType(n), refc)) { |
303 return false; |
305 return false; |
|
306 } |
304 } |
307 } |
305 return true; |
308 return true; |
306 } |
309 } |
307 |
310 |
308 /** |
311 /** |