Package com.headius.invokebinder

Examples of com.headius.invokebinder.SmartBinder.collect()


        if (arity == -1) {
            // do nothing, already have IRubyObject[] in args
        } else if (arity == 0) {
            binder = binder.insert(argOffset, "args", IRubyObject.NULL_ARRAY);
        } else {
            binder = binder
                    .collect("args", "arg[0-9]+");
        }

        // add block if needed
        if (signature.lastArgType() != Block.class) {
View Full Code Here


                .permute("context", "self", "arg.*", "block")
                .insert(2, new String[]{"rubyClass", "name"}, new Class[]{RubyModule.class, String.class}, dispatchClass, site.name())
                .insert(0, "method", DynamicMethod.class, method);

        if (site.arity > 3) {
            binder = binder.collect("args", "arg.*");
        }

        return binder.invokeVirtualQuiet(LOOKUP, "call").handle();
    }

View Full Code Here

                MethodHandle specific;
                if ((specific = compiledIRMethod.getHandleFor(site.arity)) != null) {
                    mh = specific;
                } else {
                    mh = (MethodHandle) compiledIRMethod.getHandle();
                    binder = binder.collect("args", "arg.*");
                }
            }

            if (!blockGiven) {
                binder = binder.append("block", Block.class, Block.NULL_BLOCK);
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.