Hi, I was wondering if there is any reason for Method.copyOf (and friends) being package private.
I'm trying to make a copy of a large number of Method objects in some performance sensitive code to avoid sharing the isAccessible flag. And while this is fairly fast. Class<?> declaringClass = method.getDeclaringClass(); try { return declaringClass.getDeclaredMethod(method.getName(), method.getParameterTypes()); } catch (NoSuchMethodException e) { throw new RuntimeException("This should never happen", e); } I would to like to avoid the performance penalty if possible. - Kasper