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

Method matchMethod

src/jvm/clojure/lang/Reflector.java:130–139  ·  view source on GitHub ↗
(List methods, Object[] args)

Source from the content-addressed store, hash-verified

128}
129
130private static Method matchMethod(List methods, Object[] args) {
131 Method foundm = null;
132 for(Iterator i = methods.iterator(); i.hasNext();) {
133 Method m = (Method) i.next();
134 Class[] params = m.getParameterTypes();
135 if(isCongruent(params, args) && (foundm == null || Compiler.subsumes(params, foundm.getParameterTypes())))
136 foundm = m;
137 }
138 return foundm;
139}
140
141private static Object[] widenBoxedArgs(Object[] args) {
142 Object[] widenedArgs = new Object[args.length];

Callers 1

invokeMatchingMethodMethod · 0.95

Calls 5

isCongruentMethod · 0.95
subsumesMethod · 0.95
iteratorMethod · 0.65
nextMethod · 0.65
hasNextMethod · 0.45

Tested by

no test coverage detected