Package org.jruby.internal.runtime.methods.JavaMethod

Examples of org.jruby.internal.runtime.methods.JavaMethod.JavaMethodNBlock


                return (RubyMethod)((RubyObject)self).method(name);
            }

            // try to get method from delegated object
            final RubyMethod method = (RubyMethod)((RubyObject)object).method(name);
            return RubyMethod.newMethod(self.getMetaClass(), methodName, self.getMetaClass(), methodName, new JavaMethodNBlock(self.getMetaClass(), Visibility.PUBLIC) {
                @Override
                public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args, Block block) {
                    if (self.callMethod(context, "__getobj__") != object) {
                        throw context.getRuntime().newNameError("object changed", "object changed");
                    }
View Full Code Here


        if (!self.getMetaClass().searchMethod(methodName).isUndefined()) {
            return (RubyMethod) ((RubyObject) self).method(name);
        }
        // try to get method from delegated object
        final RubyMethod method = (RubyMethod) ((RubyObject) object).method(name);
        return RubyMethod.newMethod(self.getMetaClass(), methodName, self.getMetaClass(), methodName, new JavaMethodNBlock(self.getMetaClass(), Visibility.PUBLIC) {

            @Override
            public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args, Block block) {
                if (self.callMethod(context, "__getobj__") != object) {
                    throw context.runtime.newNameError("object changed", "object changed");
View Full Code Here

TOP

Related Classes of org.jruby.internal.runtime.methods.JavaMethod.JavaMethodNBlock

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.