@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, Block block) { if (block.isGiven()) { RubyProc proc = RubyProc.newProc(context.runtime, block, block.type); JavaMethod method = (JavaMethod)findCallableArityOne(self, name, proc); Object cArg0 = convertArg(proc, method, 0); return method.invokeStaticDirect(cArg0); } else { return call(context, self, clazz, name); } }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0) { if (javaVarargsCallables != null) return call(context, self, clazz, name, new IRubyObject[] {arg0}); JavaMethod method = (JavaMethod)findCallableArityOne(self, name, arg0); if (method.isVarArgs()) return call(context, self, clazz, name, new IRubyObject[] {arg0}); Object cArg0 = convertArg(arg0, method, 0); return method.invokeStaticDirect(cArg0); }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0) { if (javaVarargsCallables != null) return call(context, self, clazz, name, new IRubyObject[] {arg0}); JavaMethod method = (JavaMethod)findCallableArityOne(self, name, arg0); if (method.isVarArgs()) return call(context, self, clazz, name, new IRubyObject[] {arg0}); Object cArg0 = convertArg(arg0, method, 0); return method.invokeStaticDirect(cArg0); }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, Block block) { if (block.isGiven()) { RubyProc proc = RubyProc.newProc(context.runtime, block, block.type); JavaMethod method = (JavaMethod)findCallableArityOne(self, name, proc); Object cArg0 = convertArg(proc, method, 0); return method.invokeStaticDirect(cArg0); } else { return call(context, self, clazz, name); } }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0) { if (javaVarargsCallables != null) return call(context, self, clazz, name, new IRubyObject[] {arg0}); JavaMethod method = (JavaMethod) findCallableArityOne(self, name, arg0); if (method.isVarArgs()) return call(context, self, clazz, name, new IRubyObject[] {arg0}); final Class<?>[] paramTypes = method.getParameterTypes(); Object cArg0 = arg0.toJava(paramTypes[0]); return method.invokeStaticDirect(context, cArg0); }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, Block block) { if (block.isGiven()) { RubyProc proc = RubyProc.newProc(context.runtime, block, block.type); JavaMethod method = (JavaMethod) findCallableArityOne(self, name, proc); final Class<?>[] paramTypes = method.getParameterTypes(); Object cArg0 = proc.toJava(paramTypes[0]); return method.invokeStaticDirect(context, cArg0); } return call(context, self, clazz, name); }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0) { if (javaVarargsCallables != null) return call(context, self, clazz, name, new IRubyObject[] {arg0}); JavaMethod method = (JavaMethod) findCallableArityOne(self, name, arg0); if (method.isVarArgs()) return call(context, self, clazz, name, new IRubyObject[] {arg0}); final Class<?>[] paramTypes = method.getParameterTypes(); Object cArg0 = arg0.toJava(paramTypes[0]); return method.invokeStaticDirect(context, cArg0); }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, Block block) { if (block.isGiven()) { RubyProc proc = RubyProc.newProc(context.runtime, block, block.type); JavaMethod method = (JavaMethod) findCallableArityOne(self, name, proc); final Class<?>[] paramTypes = method.getParameterTypes(); Object cArg0 = proc.toJava(paramTypes[0]); return method.invokeStaticDirect(context, cArg0); } return call(context, self, clazz, name); }