callable = CallableSelector.matchingCallableArityN(runtime, cache, javaVarargsCallables, args, arity); if (callable == null) { throw CallableSelector.argTypesDoNotMatch(self.getRuntime(), self, javaVarargsCallables, (Object[])args); callable = CallableSelector.matchingCallableArityN(runtime, cache, javaVarargsCallables, args, arity); if (callable == null) { throw CallableSelector.argTypesDoNotMatch(self.getRuntime(), self, javaVarargsCallables, (Object[])args); throw CallableSelector.argTypesDoNotMatch(self.getRuntime(), self, callablesForArity, (Object[])args);
callable = CallableSelector.matchingCallableArityN(runtime, cache, javaVarargsCallables, args, arity); if (callable == null) { throw CallableSelector.argTypesDoNotMatch(self.getRuntime(), self, javaVarargsCallables, (Object[])args); callable = CallableSelector.matchingCallableArityN(runtime, cache, javaVarargsCallables, args, arity); if (callable == null) { throw CallableSelector.argTypesDoNotMatch(self.getRuntime(), self, javaVarargsCallables, (Object[])args); throw CallableSelector.argTypesDoNotMatch(self.getRuntime(), self, callablesForArity, (Object[])args);
protected JavaCallable findCallableArityThree(IRubyObject self, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) { JavaCallable callable; if ((callable = javaCallable) == null) { // TODO: varargs? JavaCallable[] callablesForArity = null; if (javaCallables.length <= 3 || (callablesForArity = javaCallables[3]) == null) { throw self.getRuntime().newArgumentError(3, javaCallables.length - 1); } callable = CallableSelector.matchingCallableArityThree(runtime, cache, callablesForArity, arg0, arg1, arg2); if (callable == null) { throw CallableSelector.argTypesDoNotMatch(self.getRuntime(), self, callablesForArity, arg0, arg1, arg2); } } else { if (callable.getParameterTypes().length != 3) { throw self.getRuntime().newArgumentError(3, callable.getParameterTypes().length); } } return callable; }
protected JavaCallable findCallableArityFour(IRubyObject self, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3) { JavaCallable callable; if ((callable = javaCallable) == null) { // TODO: varargs? JavaCallable[] callablesForArity = null; if (javaCallables.length <= 4 || (callablesForArity = javaCallables[4]) == null) { throw self.getRuntime().newArgumentError(4, javaCallables.length - 1); } callable = CallableSelector.matchingCallableArityFour(runtime, cache, callablesForArity, arg0, arg1, arg2, arg3); if (callable == null) { throw CallableSelector.argTypesDoNotMatch(self.getRuntime(), self, callablesForArity, arg0, arg1, arg2, arg3); } } else { if (callable.getParameterTypes().length != 4) { throw self.getRuntime().newArgumentError(4, callable.getParameterTypes().length); } } return callable; } }
protected JavaCallable findCallableArityThree(IRubyObject self, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) { JavaCallable callable; if ((callable = javaCallable) == null) { // TODO: varargs? JavaCallable[] callablesForArity = null; if (javaCallables.length <= 3 || (callablesForArity = javaCallables[3]) == null) { throw self.getRuntime().newArgumentError(3, javaCallables.length - 1); } callable = CallableSelector.matchingCallableArityThree(runtime, cache, callablesForArity, arg0, arg1, arg2); if (callable == null) { throw CallableSelector.argTypesDoNotMatch(self.getRuntime(), self, callablesForArity, arg0, arg1, arg2); } } else { if (callable.getParameterTypes().length != 3) { throw self.getRuntime().newArgumentError(3, callable.getParameterTypes().length); } } return callable; }
protected JavaCallable findCallableArityTwo(IRubyObject self, String name, IRubyObject arg0, IRubyObject arg1) { JavaCallable callable; if ((callable = javaCallable) == null) { // TODO: varargs? JavaCallable[] callablesForArity = null; if (javaCallables.length <= 2 || (callablesForArity = javaCallables[2]) == null) { throw self.getRuntime().newArgumentError(2, javaCallables.length - 1); } callable = CallableSelector.matchingCallableArityTwo(runtime, cache, callablesForArity, arg0, arg1); if (callable == null) { throw CallableSelector.argTypesDoNotMatch(self.getRuntime(), self, callablesForArity, arg0, arg1); } } else { if (callable.getParameterTypes().length != 2) { throw self.getRuntime().newArgumentError(2, callable.getParameterTypes().length); } } return callable; }
protected JavaCallable findCallableArityOne(IRubyObject self, String name, IRubyObject arg0) { JavaCallable callable; if ((callable = javaCallable) == null) { // TODO: varargs? JavaCallable[] callablesForArity = null; if (javaCallables.length <= 1 || (callablesForArity = javaCallables[1]) == null) { throw self.getRuntime().newArgumentError(1, javaCallables.length - 1); } callable = CallableSelector.matchingCallableArityOne(runtime, cache, callablesForArity, arg0); if (callable == null) { throw CallableSelector.argTypesDoNotMatch(self.getRuntime(), self, callablesForArity, arg0); } } else { if (callable.getParameterTypes().length != 1) { throw self.getRuntime().newArgumentError(1, callable.getParameterTypes().length); } } return callable; }
protected JavaCallable findCallableArityTwo(IRubyObject self, String name, IRubyObject arg0, IRubyObject arg1) { JavaCallable callable; if ((callable = javaCallable) == null) { // TODO: varargs? JavaCallable[] callablesForArity = null; if (javaCallables.length <= 2 || (callablesForArity = javaCallables[2]) == null) { throw self.getRuntime().newArgumentError(2, javaCallables.length - 1); } callable = CallableSelector.matchingCallableArityTwo(runtime, cache, callablesForArity, arg0, arg1); if (callable == null) { throw CallableSelector.argTypesDoNotMatch(self.getRuntime(), self, callablesForArity, arg0, arg1); } } else { if (callable.getParameterTypes().length != 2) { throw self.getRuntime().newArgumentError(2, callable.getParameterTypes().length); } } return callable; }
protected JavaCallable findCallableArityOne(IRubyObject self, String name, IRubyObject arg0) { JavaCallable callable; if ((callable = javaCallable) == null) { // TODO: varargs? JavaCallable[] callablesForArity = null; if (javaCallables.length <= 1 || (callablesForArity = javaCallables[1]) == null) { throw self.getRuntime().newArgumentError(1, javaCallables.length - 1); } callable = CallableSelector.matchingCallableArityOne(runtime, cache, callablesForArity, arg0); if (callable == null) { throw CallableSelector.argTypesDoNotMatch(self.getRuntime(), self, callablesForArity, arg0); } } else { if (callable.getParameterTypes().length != 1) { throw self.getRuntime().newArgumentError(1, callable.getParameterTypes().length); } } return callable; }
protected JavaCallable findCallableArityFour(IRubyObject self, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3) { JavaCallable callable; if ((callable = javaCallable) == null) { // TODO: varargs? JavaCallable[] callablesForArity = null; if (javaCallables.length <= 4 || (callablesForArity = javaCallables[4]) == null) { throw self.getRuntime().newArgumentError(4, javaCallables.length - 1); } callable = CallableSelector.matchingCallableArityFour(runtime, cache, callablesForArity, arg0, arg1, arg2, arg3); if (callable == null) { throw CallableSelector.argTypesDoNotMatch(self.getRuntime(), self, callablesForArity, arg0, arg1, arg2, arg3); } } else { if (callable.getParameterTypes().length != 4) { throw self.getRuntime().newArgumentError(4, callable.getParameterTypes().length); } } return callable; } }