@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}); JavaProxy proxy = castJavaProxy(self); JavaMethod method = (JavaMethod)findCallableArityOne(self, name, arg0); Object cArg0 = convertArg(arg0, method, 0); return method.invokeDirect(proxy.getObject(), 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}); JavaProxy proxy = castJavaProxy(self); JavaMethod method = (JavaMethod)findCallableArityOne(self, name, arg0); Object cArg0 = convertArg(arg0, method, 0); return method.invokeDirect(proxy.getObject(), 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}); JavaProxy proxy = castJavaProxy(self); JavaMethod method = (JavaMethod) findCallableArityOne(self, name, arg0); final Class<?>[] paramTypes = method.getParameterTypes(); Object cArg0 = arg0.toJava(paramTypes[0]); return method.invokeDirect(context, proxy.getObject(), 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}); JavaProxy proxy = castJavaProxy(self); JavaMethod method = (JavaMethod) findCallableArityOne(self, name, arg0); final Class<?>[] paramTypes = method.getParameterTypes(); Object cArg0 = arg0.toJava(paramTypes[0]); return method.invokeDirect(context, proxy.getObject(), cArg0); }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, Block block) { if (block.isGiven()) { JavaProxy proxy = castJavaProxy(self); RubyProc proc = RubyProc.newProc(context.runtime, block, block.type); JavaMethod method = (JavaMethod)findCallableArityOne(self, name, proc); Object cArg0 = convertArg(proc, method, 0); return method.invokeDirect(proxy.getObject(), cArg0); } else { return call(context, self, clazz, name); } }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, Block block) { if (block.isGiven()) { JavaProxy proxy = castJavaProxy(self); RubyProc proc = RubyProc.newProc(context.runtime, block, block.type); JavaMethod method = (JavaMethod)findCallableArityOne(self, name, proc); Object cArg0 = convertArg(proc, method, 0); return method.invokeDirect(proxy.getObject(), cArg0); } else { return call(context, self, clazz, name); } }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, Block block) { if (block.isGiven()) { JavaProxy proxy = castJavaProxy(self); 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.invokeDirect(context, proxy.getObject(), cArg0); } return call(context, self, clazz, name); }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, Block block) { if (block.isGiven()) { JavaProxy proxy = castJavaProxy(self); 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.invokeDirect(context, proxy.getObject(), cArg0); } return call(context, self, clazz, name); }