Package org.jruby.javasupport.proxy

Examples of org.jruby.javasupport.proxy.JavaProxyClass$ProxyMethodImpl


                IRubyObject proxyClass = self.getMetaClass().getInstanceVariables().fastGetInstanceVariable("@java_proxy_class");
                if (proxyClass == null || proxyClass.isNil()) {
                    proxyClass = JavaProxyClass.get_with_class(self, self.getMetaClass());
                    self.getMetaClass().getInstanceVariables().fastSetInstanceVariable("@java_proxy_class", proxyClass);
                }
                JavaProxyClass realProxyClass = (JavaProxyClass)proxyClass;
                RubyArray constructors = realProxyClass.constructors();
                ArrayList<JavaProxyConstructor> forArity = new ArrayList<JavaProxyConstructor>();
                for (int i = 0; i < constructors.size(); i++) {
                    JavaProxyConstructor constructor = (JavaProxyConstructor)constructors.eltInternal(i);
                    if (constructor.getParameterTypes().length == args.length) {
                        forArity.add(constructor);
View Full Code Here


        //
        if (javaInvokee instanceof InternalJavaProxy &&
                // don't bother to check if final method, it won't
                // be there (not generated, can't be!)
                !Modifier.isFinal(method.getModifiers())) {
            JavaProxyClass jpc = ((InternalJavaProxy) javaInvokee)
                    .___getProxyClass();
            JavaProxyMethod jpm;
            if ((jpm = jpc.getMethod(method.getName(), parameterTypes)) != null &&
                    jpm.hasSuperImplementation()) {
                return invokeWithExceptionHandling(jpm.getSuperMethod(), javaInvokee, arguments);
            }
        }
        return invokeWithExceptionHandling(method, javaInvokee, arguments);
View Full Code Here

        //
        if (javaInvokee instanceof InternalJavaProxy &&
                // don't bother to check if final method, it won't
                // be there (not generated, can't be!)
                !Modifier.isFinal(method.getModifiers())) {
            JavaProxyClass jpc = ((InternalJavaProxy) javaInvokee)
                    .___getProxyClass();
            JavaProxyMethod jpm;
            if ((jpm = jpc.getMethod(method.getName(), parameterTypes)) != null &&
                    jpm.hasSuperImplementation()) {
                return invokeWithExceptionHandling(jpm.getSuperMethod(), javaInvokee, args);
            }
        }
        return invokeWithExceptionHandling(method, javaInvokee, args);
View Full Code Here

            //
            if (javaInvokee instanceof InternalJavaProxy &&
                    // don't bother to check if final method, it won't
                    // be there (not generated, can't be!)
                    !Modifier.isFinal(method.getModifiers())) {
                JavaProxyClass jpc = ((InternalJavaProxy) javaInvokee)
                        .___getProxyClass();
                JavaProxyMethod jpm;
                if ((jpm = jpc.getMethod(method.getName(), parameterTypes)) != null &&
                        jpm.hasSuperImplementation()) {
                    return invokeWithExceptionHandling(jpm.getSuperMethod(), javaInvokee, arguments);
                }
            }
        }
View Full Code Here

        // this test really means, that this is a ruby-defined subclass of a java class
        return javaInvokee instanceof InternalJavaProxy && !isFinal;
    }

    private IRubyObject tryProxyInvocation(Object javaInvokee, Object... args) {
        JavaProxyClass jpc = ((InternalJavaProxy) javaInvokee).___getProxyClass();
        JavaProxyMethod jpm;
        if ((jpm = jpc.getMethod(method.getName(), parameterTypes)) != null && jpm.hasSuperImplementation()) {
            return invokeDirectSuperWithExceptionHandling(jpm.getSuperMethod(), javaInvokee, args);
        } else {
            return invokeDirectWithExceptionHandling(method, javaInvokee, args);
        }
    }
View Full Code Here

            return invokeDirectWithExceptionHandling(method, javaInvokee, args);
        }
    }

    private IRubyObject tryProxyInvocation(Object javaInvokee) {
        JavaProxyClass jpc = ((InternalJavaProxy) javaInvokee).___getProxyClass();
        JavaProxyMethod jpm;
        if ((jpm = jpc.getMethod(method.getName(), parameterTypes)) != null && jpm.hasSuperImplementation()) {
            return invokeDirectSuperWithExceptionHandling(jpm.getSuperMethod(), javaInvokee);
        } else {
            return invokeDirectWithExceptionHandling(method, javaInvokee);
        }
    }
View Full Code Here

            return invokeDirectWithExceptionHandling(method, javaInvokee);
        }
    }

    private IRubyObject tryProxyInvocation(Object javaInvokee, Object arg0) {
        JavaProxyClass jpc = ((InternalJavaProxy) javaInvokee).___getProxyClass();
        JavaProxyMethod jpm;
        if ((jpm = jpc.getMethod(method.getName(), parameterTypes)) != null && jpm.hasSuperImplementation()) {
            return invokeDirectSuperWithExceptionHandling(jpm.getSuperMethod(), javaInvokee, arg0);
        } else {
            return invokeDirectWithExceptionHandling(method, javaInvokee, arg0);
        }
    }
View Full Code Here

            return invokeDirectWithExceptionHandling(method, javaInvokee, arg0);
        }
    }

    private IRubyObject tryProxyInvocation(Object javaInvokee, Object arg0, Object arg1) {
        JavaProxyClass jpc = ((InternalJavaProxy) javaInvokee).___getProxyClass();
        JavaProxyMethod jpm;
        if ((jpm = jpc.getMethod(method.getName(), parameterTypes)) != null && jpm.hasSuperImplementation()) {
            return invokeDirectSuperWithExceptionHandling(jpm.getSuperMethod(), javaInvokee, arg0, arg1);
        } else {
            return invokeDirectWithExceptionHandling(method, javaInvokee, arg0, arg1);
        }
    }
View Full Code Here

            return invokeDirectWithExceptionHandling(method, javaInvokee, arg0, arg1);
        }
    }

    private IRubyObject tryProxyInvocation(Object javaInvokee, Object arg0, Object arg1, Object arg2) {
        JavaProxyClass jpc = ((InternalJavaProxy) javaInvokee).___getProxyClass();
        JavaProxyMethod jpm;
        if ((jpm = jpc.getMethod(method.getName(), parameterTypes)) != null && jpm.hasSuperImplementation()) {
            return invokeDirectSuperWithExceptionHandling(jpm.getSuperMethod(), javaInvokee, arg0, arg1, arg2);
        } else {
            return invokeDirectWithExceptionHandling(method, javaInvokee, arg0, arg1, arg2);
        }
    }
View Full Code Here

            return invokeDirectWithExceptionHandling(method, javaInvokee, arg0, arg1, arg2);
        }
    }

    private IRubyObject tryProxyInvocation(Object javaInvokee, Object arg0, Object arg1, Object arg2, Object arg3) {
        JavaProxyClass jpc = ((InternalJavaProxy) javaInvokee).___getProxyClass();
        JavaProxyMethod jpm;
        if ((jpm = jpc.getMethod(method.getName(), parameterTypes)) != null && jpm.hasSuperImplementation()) {
            return invokeDirectSuperWithExceptionHandling(jpm.getSuperMethod(), javaInvokee, arg0, arg1, arg2, arg3);
        } else {
            return invokeDirectWithExceptionHandling(method, javaInvokee, arg0, arg1, arg2, arg3);
        }
    }
View Full Code Here

TOP

Related Classes of org.jruby.javasupport.proxy.JavaProxyClass$ProxyMethodImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.