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

Method checkMethodArity

src/jvm/clojure/lang/Compiler.java:1405–1411  ·  view source on GitHub ↗
(Executable method, int argCount)

Source from the content-addressed store, hash-verified

1403}
1404
1405private static void checkMethodArity(Executable method, int argCount) {
1406 if(method.getParameterCount() != argCount)
1407 throw new IllegalArgumentException("Invocation of "
1408 + methodDescription(method.getDeclaringClass(),
1409 (method instanceof Constructor) ? "new" : method.getName())
1410 + " expected " + method.getParameterCount() + " arguments, but received " + argCount);
1411}
1412
1413private static String methodDescription(Class c, String methodName) {
1414 boolean isCtor = c != null && methodName.equals("new");

Callers 3

InstanceMethodExprMethod · 0.80
StaticMethodExprMethod · 0.80
NewExprMethod · 0.80

Calls 2

methodDescriptionMethod · 0.95
getNameMethod · 0.65

Tested by

no test coverage detected