MCPcopy Index your code
hub / github.com/clojure/clojure / canAccess

Method canAccess

src/jvm/clojure/lang/Reflector.java:46–58  ·  view source on GitHub ↗
(Method m, Object target)

Source from the content-addressed store, hash-verified

44}
45
46private static boolean canAccess(Method m, Object target) {
47 if (CAN_ACCESS_PRED != null) {
48 // JDK9+ use j.l.r.AccessibleObject::canAccess, which respects module rules
49 try {
50 return (boolean) CAN_ACCESS_PRED.invoke(m, target);
51 } catch (Throwable t) {
52 throw Util.sneakyThrow(t);
53 }
54 } else {
55 // JDK 8
56 return true;
57 }
58}
59
60private static Collection<Class> interfaces(Class c) {
61 Set<Class> interfaces = new HashSet<Class>();

Callers 3

invokeMatchingMethodMethod · 0.95
isAccessibleMatchMethod · 0.95

Calls 2

sneakyThrowMethod · 0.95
invokeMethod · 0.65

Tested by

no test coverage detected