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

Method getAsMethodOfAccessibleBase

src/jvm/clojure/lang/Reflector.java:255–277  ·  view source on GitHub ↗
(Class c, Method m, Object target)

Source from the content-addressed store, hash-verified

253}
254
255public static Method getAsMethodOfAccessibleBase(Class c, Method m, Object target){
256 for(Class iface : c.getInterfaces())
257 {
258 for(Method im : iface.getMethods())
259 {
260 if(isAccessibleMatch(im, m, target))
261 {
262 return im;
263 }
264 }
265 }
266 Class sc = c.getSuperclass();
267 if(sc == null)
268 return null;
269 for(Method scm : sc.getMethods())
270 {
271 if(isAccessibleMatch(scm, m, target))
272 {
273 return scm;
274 }
275 }
276 return getAsMethodOfAccessibleBase(sc, m, target);
277}
278
279public static boolean isAccessibleMatch(Method lhs, Method rhs, Object target) {
280 if(!lhs.getName().equals(rhs.getName())

Callers 1

invokeMatchingMethodMethod · 0.95

Calls 3

isAccessibleMatchMethod · 0.95
getInterfacesMethod · 0.80
getMethodsMethod · 0.80

Tested by

no test coverage detected