Examples of invoke_static()


Examples of net.sf.cglib.core.CodeEmitter.invoke_static()

/* 131 */           String s = ReflectUtils.getSignature((Method)obj).toString();
/* 132 */           return s.substring(0, s.lastIndexOf(')') + 1);
/*     */         }
/*     */       });
/* 135 */       e.load_args();
/* 136 */       e.invoke_static(FAST_CLASS, GET_SIGNATURE_WITHOUT_RETURN_TYPE);
/* 137 */       signatureSwitchHelper(e, signatures);
/*     */     } else {
/* 139 */       e.load_args();
/* 140 */       List info = CollectionUtils.transform(methods, MethodInfoTransformer.getInstance());
/* 141 */       EmitUtils.method_switch(e, info, new GetIndexCallback(e, info));
View Full Code Here

Examples of org.jruby.javasupport.JavaMethod.invoke_static()

        JavaMethod method = (JavaMethod)findCallable(self, name, args, len);
        Class[] targetTypes = method.getParameterTypes();
        for (int i = len; --i >= 0;) {
            convertedArgs[i] = JavaUtil.convertArgumentToType(context, args[i], targetTypes[i]);
        }
        return Java.java_to_ruby(self, method.invoke_static(convertedArgs), Block.NULL_BLOCK);
    }

    public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name) {
        createJavaMethods(self.getRuntime());
        JavaMethod method = (JavaMethod)findCallableArityZero(self, name);
View Full Code Here

Examples of org.jruby.javasupport.JavaMethod.invoke_static()

    public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name) {
        createJavaMethods(self.getRuntime());
        JavaMethod method = (JavaMethod)findCallableArityZero(self, name);

        return Java.java_to_ruby(self, method.invoke_static(EMPTY_OBJECT_ARRAY), Block.NULL_BLOCK);
    }

    public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0) {
        createJavaMethods(self.getRuntime());
        Object[] convertedArgs = new Object[1];
View Full Code Here

Examples of org.jruby.javasupport.JavaMethod.invoke_static()

        createJavaMethods(self.getRuntime());
        Object[] convertedArgs = new Object[1];
        JavaMethod method = (JavaMethod)findCallableArityOne(self, name, arg0);
        convertedArgs[0] = JavaUtil.convertArgumentToType(context, arg0, method.getParameterTypes()[0]);

        return Java.java_to_ruby(self, method.invoke_static(convertedArgs), Block.NULL_BLOCK);
    }

    public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1) {
        createJavaMethods(self.getRuntime());
        Object[] convertedArgs = new Object[2];
View Full Code Here

Examples of org.jruby.javasupport.JavaMethod.invoke_static()

        Object[] convertedArgs = new Object[2];
        JavaMethod method = (JavaMethod)findCallableArityTwo(self, name, arg0, arg1);
        convertedArgs[0] = JavaUtil.convertArgumentToType(context, arg0, method.getParameterTypes()[0]);
        convertedArgs[1] = JavaUtil.convertArgumentToType(context, arg1, method.getParameterTypes()[1]);

        return Java.java_to_ruby(self, method.invoke_static(convertedArgs), Block.NULL_BLOCK);
    }

    public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) {
        createJavaMethods(self.getRuntime());
        Object[] convertedArgs = new Object[3];
View Full Code Here

Examples of org.jruby.javasupport.JavaMethod.invoke_static()

        JavaMethod method = (JavaMethod)findCallableArityThree(self, name, arg0, arg1, arg2);
        convertedArgs[0] = JavaUtil.convertArgumentToType(context, arg0, method.getParameterTypes()[0]);
        convertedArgs[1] = JavaUtil.convertArgumentToType(context, arg1, method.getParameterTypes()[1]);
        convertedArgs[2] = JavaUtil.convertArgumentToType(context, arg2, method.getParameterTypes()[2]);

        return Java.java_to_ruby(self, method.invoke_static(convertedArgs), Block.NULL_BLOCK);
    }

    public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args, Block block) {
        createJavaMethods(self.getRuntime());
        if (block.isGiven()) {
View Full Code Here

Examples of org.jruby.javasupport.JavaMethod.invoke_static()

            JavaMethod method = (JavaMethod)findCallable(self, name, intermediate, len + 1);
            for (int i = 0; i < len + 1; i++) {
                convertedArgs[i] = JavaUtil.convertArgumentToType(context, intermediate[i], method.getParameterTypes()[i]);
            }

            return Java.java_to_ruby(self, method.invoke_static(convertedArgs), Block.NULL_BLOCK);
        } else {
            return call(context, self, clazz, name, args);
        }
    }
View Full Code Here

Examples of org.jruby.javasupport.JavaMethod.invoke_static()

            Object[] convertedArgs = new Object[1];
            RubyProc proc = RubyProc.newProc(self.getRuntime(), block, Block.Type.LAMBDA);
            JavaMethod method = (JavaMethod)findCallableArityOne(self, name, proc);
            convertedArgs[0] = JavaUtil.convertArgumentToType(context, proc, method.getParameterTypes()[0]);

            return Java.java_to_ruby(self, method.invoke_static(convertedArgs), Block.NULL_BLOCK);
        } else {
            return call(context, self, clazz, name);
        }
    }
View Full Code Here

Examples of org.jruby.javasupport.JavaMethod.invoke_static()

            RubyProc proc = RubyProc.newProc(self.getRuntime(), block, Block.Type.LAMBDA);
            JavaMethod method = (JavaMethod)findCallableArityTwo(self, name, arg0, proc);
            convertedArgs[0] = JavaUtil.convertArgumentToType(context, arg0, method.getParameterTypes()[0]);
            convertedArgs[1] = JavaUtil.convertArgumentToType(context, proc, method.getParameterTypes()[1]);

            return Java.java_to_ruby(self, method.invoke_static(convertedArgs), Block.NULL_BLOCK);
        } else {
            return call(context, self, clazz, name, arg0);
        }
    }
View Full Code Here

Examples of org.jruby.javasupport.JavaMethod.invoke_static()

            JavaMethod method = (JavaMethod)findCallableArityThree(self, name, arg0, arg1, proc);
            convertedArgs[0] = JavaUtil.convertArgumentToType(context, arg0, method.getParameterTypes()[0]);
            convertedArgs[1] = JavaUtil.convertArgumentToType(context, arg1, method.getParameterTypes()[1]);
            convertedArgs[2] = JavaUtil.convertArgumentToType(context, proc, method.getParameterTypes()[2]);

            return Java.java_to_ruby(self, method.invoke_static(convertedArgs), Block.NULL_BLOCK);
        } else {
            return call(context, self, clazz, name, arg0, arg1);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.