Package org.jruby.java.invokers

Examples of org.jruby.java.invokers.StaticMethodInvoker


        }

        void install(RubyModule proxy) {
            if (hasLocalMethod()) {
                RubyClass singleton = proxy.getSingletonClass();
                DynamicMethod method = new StaticMethodInvoker(singleton, methods);
                singleton.addMethod(name, method);
                if (aliases != null && isPublic() ) {
                    singleton.defineAliases(aliases, this.name);
                    aliases = null;
                }
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

        }
    }

    private static MethodInvoker getMethodInvokerForMethod(RubyClass metaClass, Method method) {
        if (Modifier.isStatic(method.getModifiers())) {
            return new StaticMethodInvoker(metaClass.getMetaClass(), method);
        } else {
            return new InstanceMethodInvoker(metaClass, method);
        }
    }
View Full Code Here

        }

        void install(RubyModule proxy) {
            if (hasLocalMethod()) {
                RubyClass singleton = proxy.getSingletonClass();
                DynamicMethod method = new StaticMethodInvoker(singleton, methods);
                singleton.addMethod(name, method);
                if (aliases != null && isPublic() ) {
                    singleton.defineAliases(aliases, this.name);
                    aliases = null;
                }
View Full Code Here

        }
    }

    private MethodInvoker getMethodInvoker(Method method) {
        if (Modifier.isStatic(method.getModifiers())) {
            return new StaticMethodInvoker(metaClass.getMetaClass(), method);
        } else {
            return new InstanceMethodInvoker(metaClass, method);
        }
    }
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

        }
    }

    private static MethodInvoker getMethodInvokerForMethod(RubyClass metaClass, Method method) {
        if (Modifier.isStatic(method.getModifiers())) {
            return new StaticMethodInvoker(metaClass.getMetaClass(), method);
        } else {
            return new InstanceMethodInvoker(metaClass, method);
        }
    }
View Full Code Here

        }

        void install(RubyModule proxy) {
            if (hasLocalMethod()) {
                RubyClass singleton = proxy.getSingletonClass();
                DynamicMethod method = new StaticMethodInvoker(singleton, methods);
                singleton.addMethod(name, method);
                if (aliases != null && isPublic() ) {
                    singleton.defineAliases(aliases, this.name);
                    aliases = null;
                }
View Full Code Here

        }
    }

    private MethodInvoker getMethodInvoker(Method method) {
        if (Modifier.isStatic(method.getModifiers())) {
            return new StaticMethodInvoker(metaClass.getMetaClass(), method);
        } else {
            return new InstanceMethodInvoker(metaClass, method);
        }
    }
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

TOP

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

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.