private T matchVarArgsCallableArityThree(IRubyObject self, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) { final T[] varArgsCallables = this.javaVarargsCallables; if ( varArgsCallables != null ) { T callable = CallableSelector.matchingCallableArityThree(runtime, this, varArgsCallables, arg0, arg1, arg2); if ( callable == null ) { throw newErrorDueArgumentTypeMismatch(self, varArgsCallables, arg0, arg1, arg2); } return callable; } return null; }
private T matchVarArgsCallableArityThree(IRubyObject self, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) { final T[] varArgsCallables = this.javaVarargsCallables; if ( varArgsCallables != null ) { T callable = CallableSelector.matchingCallableArityThree(runtime, this, varArgsCallables, arg0, arg1, arg2); if ( callable == null ) { throw newErrorDueArgumentTypeMismatch(self, varArgsCallables, arg0, arg1, arg2); } return callable; } return null; }
protected final T findCallableArityThree(IRubyObject self, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) { T callable = this.javaCallable; if ( callable == null ) { // TODO: varargs? final T[] callablesForArity; if ( javaCallables.length <= 3 || (callablesForArity = javaCallables[3]) == null ) { if ( ( callable = matchVarArgsCallableArityThree(self, arg0, arg1, arg2) ) == null ) { throw runtime.newArgumentError(3, javaCallables.length - 1); } return callable; } callable = CallableSelector.matchingCallableArityThree(runtime, this, callablesForArity, arg0, arg1, arg2); if ( callable == null ) { if ( ( callable = matchVarArgsCallableArityThree(self, arg0, arg1, arg2) ) == null ) { throw newErrorDueArgumentTypeMismatch(self, callablesForArity, arg0, arg1, arg2); } } } else { if (!callable.isVarArgs()) checkCallableArity(callable, 3); } return callable; }
protected final T findCallableArityThree(IRubyObject self, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) { T callable = this.javaCallable; if ( callable == null ) { // TODO: varargs? final T[] callablesForArity; if ( javaCallables.length <= 3 || (callablesForArity = javaCallables[3]) == null ) { if ( ( callable = matchVarArgsCallableArityThree(self, arg0, arg1, arg2) ) == null ) { throw runtime.newArgumentError(3, javaCallables.length - 1); } return callable; } callable = CallableSelector.matchingCallableArityThree(runtime, this, callablesForArity, arg0, arg1, arg2); if ( callable == null ) { if ( ( callable = matchVarArgsCallableArityThree(self, arg0, arg1, arg2) ) == null ) { throw newErrorDueArgumentTypeMismatch(self, callablesForArity, arg0, arg1, arg2); } } } else { if (!callable.isVarArgs()) checkCallableArity(callable, 3); } 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 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; }