public final Object newInstance(Object[] args, JavaProxyInvocationHandler handler) throws IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException { final int len = args.length; if ( len != actualParameterTypes.length ) { throw new IllegalArgumentException("wrong number of parameters"); } return newInstanceImpl(ArraySupport.newCopy(args, len + 1), handler); // does args[ len ] = handler; }
public final Object newInstance(Object[] args, JavaProxyInvocationHandler handler) throws IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException { final int len = args.length; if ( len != actualParameterTypes.length ) { throw new IllegalArgumentException("wrong number of parameters"); } return newInstanceImpl(ArraySupport.newCopy(args, len + 1), handler); // does args[ len ] = handler; }
public final JavaObject newInstance(final IRubyObject self, IRubyObject[] args) throws RaiseException { final Ruby runtime = getRuntime(); final Object[] javaArgsPlus1 = RubyToJavaInvoker.convertArguments(this, args, +1); JavaProxyInvocationHandler handler = new MethodInvocationHandler(runtime, self); try { return JavaObject.wrap(runtime, newInstanceImpl(javaArgsPlus1, handler)); } catch (Throwable ex) { throw mapInstantiationException(runtime, ex); } }
public final JavaObject newInstance(final IRubyObject self, IRubyObject arg0) throws RaiseException { final Ruby runtime = getRuntime(); final Object[] javaArgsPlus1 = RubyToJavaInvoker.convertArguments(this, arg0, +1); JavaProxyInvocationHandler handler = new MethodInvocationHandler(runtime, self); try { return JavaObject.wrap(runtime, newInstanceImpl(javaArgsPlus1, handler)); } catch (Throwable ex) { throw mapInstantiationException(runtime, ex); } }
public final JavaObject newInstance(final IRubyObject self, IRubyObject[] args) throws RaiseException { final Ruby runtime = getRuntime(); final Object[] javaArgsPlus1 = RubyToJavaInvoker.convertArguments(this, args, +1); JavaProxyInvocationHandler handler = new MethodInvocationHandler(runtime, self); try { return JavaObject.wrap(runtime, newInstanceImpl(javaArgsPlus1, handler)); } catch (Throwable ex) { throw mapInstantiationException(runtime, ex); } }
public final JavaObject newInstance(final IRubyObject self, IRubyObject arg0) throws RaiseException { final Ruby runtime = getRuntime(); final Object[] javaArgsPlus1 = RubyToJavaInvoker.convertArguments(this, arg0, +1); JavaProxyInvocationHandler handler = new MethodInvocationHandler(runtime, self); try { return JavaObject.wrap(runtime, newInstanceImpl(javaArgsPlus1, handler)); } catch (Throwable ex) { throw mapInstantiationException(runtime, ex); } }