protected static void initialize(final RubyClass ConcreteJavaProxy) { ConcreteJavaProxy.addMethod("initialize", new InitializeMethod(ConcreteJavaProxy)); // We define a custom "new" method to ensure that __jcreate! is getting called, // so that if the user doesn't call super in their subclasses, the object will // still get set up properly. See JRUBY-4704. RubyClass singleton = ConcreteJavaProxy.getSingletonClass(); singleton.addMethod("new", new NewMethod(singleton)); }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) { IRubyObject proxy = newMethod.call(context, self, clazz, "new_proxy", arg0, arg1, arg2); if ( ((JavaProxy) proxy).object == null ) jcreateSite().call(context, proxy, proxy, arg0, arg1, arg2); return proxy; }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0) { IRubyObject proxy = newMethod.call(context, self, clazz, "new_proxy", arg0); if ( ((JavaProxy) proxy).object == null ) jcreateSite().call(context, proxy, proxy, arg0); return proxy; }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name) { IRubyObject proxy = newMethod.call(context, self, clazz, "new_proxy"); if ( ((JavaProxy) proxy).object == null ) jcreateSite().call(context, proxy, proxy); return proxy; }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, Block block) { IRubyObject proxy = newMethod.call(context, self, clazz, "new_proxy", arg0, block); if ( ((JavaProxy) proxy).object == null ) jcreateSite().call(context, proxy, proxy, arg0, block); return proxy; }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args, Block block) { IRubyObject proxy = newMethod.call(context, self, clazz, "new_proxy", args, block); if ( ((JavaProxy) proxy).object == null ) jcreateSite().call(context, proxy, proxy, args, block); return proxy; }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) { IRubyObject proxy = newMethod.call(context, self, clazz, "new_proxy", arg0, arg1, arg2); if ( ((JavaProxy) proxy).object == null ) jcreateSite().call(context, proxy, proxy, arg0, arg1, arg2); return proxy; }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0) { IRubyObject proxy = newMethod.call(context, self, clazz, "new_proxy", arg0); if ( ((JavaProxy) proxy).object == null ) jcreateSite().call(context, proxy, proxy, arg0); return proxy; }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1) { IRubyObject proxy = newMethod.call(context, self, clazz, "new_proxy", arg0, arg1); if ( ((JavaProxy) proxy).object == null ) jcreateSite().call(context, proxy, proxy, arg0, arg1); return proxy; }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block) { IRubyObject proxy = newMethod.call(context, self, clazz, "new_proxy", arg0, arg1, arg2, block); if ( ((JavaProxy) proxy).object == null ) jcreateSite().call(context, proxy, proxy, arg0, arg1, arg2, block); return proxy; }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, Block block) { IRubyObject proxy = newMethod.call(context, self, clazz, "new_proxy", block); if ( ((JavaProxy) proxy).object == null ) jcreateSite().call(context, proxy, proxy, block); return proxy; }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args) { IRubyObject proxy = newMethod.call(context, self, clazz, "new_proxy", args); if ( ((JavaProxy) proxy).object == null ) jcreateSite().call(context, proxy, proxy, args); return proxy; }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args, Block block) { IRubyObject proxy = newMethod.call(context, self, clazz, "new_proxy", args, block); if ( ((JavaProxy) proxy).object == null ) jcreateSite().call(context, proxy, proxy, args, block); return proxy; }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1) { IRubyObject proxy = newMethod.call(context, self, clazz, "new_proxy", arg0, arg1); if ( ((JavaProxy) proxy).object == null ) jcreateSite().call(context, proxy, proxy, arg0, arg1); return proxy; }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name) { IRubyObject proxy = newMethod.call(context, self, clazz, "new_proxy"); if ( ((JavaProxy) proxy).object == null ) jcreateSite().call(context, proxy, proxy); return proxy; }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, Block block) { IRubyObject proxy = newMethod.call(context, self, clazz, "new_proxy", arg0, block); if ( ((JavaProxy) proxy).object == null ) jcreateSite().call(context, proxy, proxy, arg0, block); return proxy; }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, Block block) { IRubyObject proxy = newMethod.call(context, self, clazz, "new_proxy", block); if ( ((JavaProxy) proxy).object == null ) jcreateSite().call(context, proxy, proxy, block); return proxy; }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, Block block) { IRubyObject proxy = newMethod.call(context, self, clazz, "new_proxy", arg0, arg1, block); if ( ((JavaProxy) proxy).object == null ) jcreateSite().call(context, proxy, proxy, arg0, arg1, block); return proxy; }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block) { IRubyObject proxy = newMethod.call(context, self, clazz, "new_proxy", arg0, arg1, arg2, block); if ( ((JavaProxy) proxy).object == null ) jcreateSite().call(context, proxy, proxy, arg0, arg1, arg2, block); return proxy; }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, Block block) { IRubyObject proxy = newMethod.call(context, self, clazz, "new_proxy", arg0, arg1, block); if ( ((JavaProxy) proxy).object == null ) jcreateSite().call(context, proxy, proxy, arg0, arg1, block); return proxy; }