public static Object newProxyInstance(Ruby runtime, Class superClass, Class[] interfaces, Class[] constructorParameters, Object[] constructorArgs, JavaProxyInvocationHandler handler) throws IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException, SecurityException, NoSuchMethodException { JavaProxyClass proxyClass = newProxyClass(runtime, superClass, interfaces); JavaProxyConstructor constructor = proxyClass.getConstructor( constructorParameters == null ? EMPTY_CLASS_ARRAY : constructorParameters ); return constructor.newInstance(constructorArgs, handler); }
public static Object newProxyInstance(Ruby runtime, Class superClass, Class[] interfaces, Class[] constructorParameters, Object[] constructorArgs, JavaProxyInvocationHandler handler) throws IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException, SecurityException, NoSuchMethodException { JavaProxyClass proxyClass = newProxyClass(runtime, superClass, interfaces); JavaProxyConstructor constructor = proxyClass.getConstructor( constructorParameters == null ? EMPTY_CLASS_ARRAY : constructorParameters ); return constructor.newInstance(constructorArgs, handler); }
public static Object newProxyInstance(Ruby runtime, Class superClass, Class[] interfaces, Class[] constructorParameters, Object[] constructorArgs, JavaProxyInvocationHandler handler) throws IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException, SecurityException, NoSuchMethodException { JavaProxyClass jpc = getProxyClass(runtime, superClass, interfaces); JavaProxyConstructor cons = jpc.getConstructor(constructorParameters == null ? new Class[0] : constructorParameters); return cons.newInstance(constructorArgs, handler); }
public static Object newProxyInstance(Ruby runtime, Class superClass, Class[] interfaces, Class[] constructorParameters, Object[] constructorArgs, JavaProxyInvocationHandler handler) throws IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException, SecurityException, NoSuchMethodException { JavaProxyClass jpc = getProxyClass(runtime, superClass, interfaces); JavaProxyConstructor cons = jpc.getConstructor(constructorParameters == null ? new Class[0] : constructorParameters); return cons.newInstance(constructorArgs, handler); }