public JavaProxyConstructor[] getConstructors() { JavaProxyConstructor[] constructors = this.constructors; if ( constructors != null ) return constructors; final Ruby runtime = getRuntime(); final Constructor[] ctors = proxyClass.getConstructors(); constructors = new JavaProxyConstructor[ ctors.length ]; for ( int i = 0; i < ctors.length; i++ ) { constructors[i] = new JavaProxyConstructor(runtime, this, ctors[i]); } return this.constructors = constructors; }
public JavaProxyConstructor[] getConstructors() { Constructor[] cons = proxyClass.getConstructors(); JavaProxyConstructor[] result = new JavaProxyConstructor[cons.length]; for (int i = 0; i < cons.length; i++) { result[i] = new JavaProxyConstructor(getRuntime(), this, cons[i]); } return result; }
public JavaProxyConstructor getConstructor(final Class[] args) throws SecurityException, NoSuchMethodException { final Class[] realArgs = new Class[args.length + 1]; System.arraycopy(args, 0, realArgs, 0, args.length); realArgs[ args.length ] = JavaProxyInvocationHandler.class; @SuppressWarnings("unchecked") Constructor<?> constructor = proxyClass.getConstructor(realArgs); return new JavaProxyConstructor(getRuntime(), this, constructor); }
public JavaProxyConstructor[] getConstructors() { JavaProxyConstructor[] constructors = this.constructors; if ( constructors != null ) return constructors; final Ruby runtime = getRuntime(); final Constructor[] ctors = proxyClass.getConstructors(); constructors = new JavaProxyConstructor[ ctors.length ]; for ( int i = 0; i < ctors.length; i++ ) { constructors[i] = new JavaProxyConstructor(runtime, this, ctors[i]); } return this.constructors = constructors; }
public JavaProxyConstructor getConstructor(Class[] args) throws SecurityException, NoSuchMethodException { Class[] realArgs = new Class[args.length + 1]; System.arraycopy(args, 0, realArgs, 0, args.length); realArgs[args.length] = JavaProxyInvocationHandler.class; Constructor constructor = proxyClass.getConstructor(realArgs); return new JavaProxyConstructor(getRuntime(), this, constructor); }
public JavaProxyConstructor getConstructor(Class[] args) throws SecurityException, NoSuchMethodException { Class[] realArgs = new Class[args.length + 1]; System.arraycopy(args, 0, realArgs, 0, args.length); realArgs[args.length] = JavaProxyInvocationHandler.class; Constructor constructor = proxyClass.getConstructor(realArgs); return new JavaProxyConstructor(getRuntime(), this, constructor); }
public JavaProxyConstructor getConstructor(final Class[] args) throws SecurityException, NoSuchMethodException { final Class[] realArgs = new Class[args.length + 1]; System.arraycopy(args, 0, realArgs, 0, args.length); realArgs[ args.length ] = JavaProxyInvocationHandler.class; @SuppressWarnings("unchecked") Constructor<?> constructor = proxyClass.getConstructor(realArgs); return new JavaProxyConstructor(getRuntime(), this, constructor); }
public JavaProxyConstructor[] getConstructors() { Constructor[] cons = proxyClass.getConstructors(); JavaProxyConstructor[] result = new JavaProxyConstructor[cons.length]; for (int i = 0; i < cons.length; i++) { result[i] = new JavaProxyConstructor(getRuntime(), this, cons[i]); } return result; }