Package org.jruby.java.invokers

Examples of org.jruby.java.invokers.MethodInvoker


        Method jmethod = getMethodFromClass(runtime, proxyClass, name, argTypesClasses);
        String prettyName = name + CodegenUtils.prettyParams(argTypesClasses);
       
        if (Modifier.isStatic(jmethod.getModifiers())) {
            MethodInvoker invoker = new StaticMethodInvoker(rubyClass, jmethod);
            return RubyMethod.newMethod(rubyClass, prettyName, rubyClass, name, invoker, proxyClass);
        } else {
            MethodInvoker invoker = new InstanceMethodInvoker(rubyClass, jmethod);
            return RubyUnboundMethod.newUnboundMethod(rubyClass, prettyName, rubyClass, name, invoker);
        }
    }
View Full Code Here


            } else {
                throw runtime.newTypeError(proxyClass, runtime.getModule());
            }

            Method method = getMethodFromClass(runtime, proxyClass, name, argTypesClasses);
            MethodInvoker invoker = getMethodInvokerForMethod(rubyClass, method);

            if (Modifier.isStatic(method.getModifiers())) {
                // add alias to meta
                rubyClass.getSingletonClass().addMethod(newNameStr, invoker);
            } else {
View Full Code Here

        Method jmethod = getMethodFromClass(runtime, proxyClass, name, argTypesClasses);
        String prettyName = name + CodegenUtils.prettyParams(argTypesClasses);
       
        if (Modifier.isStatic(jmethod.getModifiers())) {
            MethodInvoker invoker = new StaticMethodInvoker(rubyClass, jmethod);
            return RubyMethod.newMethod(rubyClass, prettyName, rubyClass, name, invoker, proxyClass);
        } else {
            MethodInvoker invoker = new InstanceMethodInvoker(rubyClass, jmethod);
            return RubyUnboundMethod.newUnboundMethod(rubyClass, prettyName, rubyClass, name, invoker);
        }
    }
View Full Code Here

            } else {
                throw runtime.newTypeError(proxyClass, runtime.getModule());
            }

            Method method = getMethodFromClass(runtime, proxyClass, name, argTypesClasses);
            MethodInvoker invoker = getMethodInvokerForMethod(rubyClass, method);

            if (Modifier.isStatic(method.getModifiers())) {
                // add alias to meta
                rubyClass.getSingletonClass().addMethod(newNameStr, invoker);
            } else {
View Full Code Here

        Method jmethod = getMethodFromClass(runtime, proxyClass, name, argTypesClasses);
        String prettyName = name + CodegenUtils.prettyParams(argTypesClasses);
       
        if (Modifier.isStatic(jmethod.getModifiers())) {
            MethodInvoker invoker = new StaticMethodInvoker(rubyClass, jmethod);
            return RubyMethod.newMethod(rubyClass, prettyName, rubyClass, name, invoker, proxyClass);
        } else {
            MethodInvoker invoker = new InstanceMethodInvoker(rubyClass, jmethod);
            return RubyUnboundMethod.newUnboundMethod(rubyClass, prettyName, rubyClass, name, invoker);
        }
    }
View Full Code Here

            } else {
                throw runtime.newTypeError(proxyClass, runtime.getModule());
            }

            Method method = getMethodFromClass(runtime, proxyClass, name, argTypesClasses);
            MethodInvoker invoker = getMethodInvokerForMethod(rubyClass, method);

            if (Modifier.isStatic(method.getModifiers())) {
                // add alias to meta
                rubyClass.getSingletonClass().addMethod(newNameStr, invoker);
            } else {
View Full Code Here

TOP

Related Classes of org.jruby.java.invokers.MethodInvoker

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.