Package org.jruby

Examples of org.jruby.RubyClass$SpecificArityNew


     * invoking.
     */
    public static IRubyObject invokeSuper(ThreadContext context, IRubyObject self, IRubyObject[] args, Block block) {
        RubyModule klazz = context.getFrameKlazz();

        RubyClass superClass = findImplementerIfNecessary(self.getMetaClass(), klazz).getSuperClass();
       
        if (superClass == null) {
            String name = context.getFrameName();
            return callMethodMissing(context, self, klazz.searchMethod(name), name, args, CallType.SUPER, block);
        }
View Full Code Here


    }
   
    public static IRubyObject invokeSuper(ThreadContext context, IRubyObject self, Block block) {
        RubyModule klazz = context.getFrameKlazz();

        RubyClass superClass = findImplementerIfNecessary(self.getMetaClass(), klazz).getSuperClass();
       
        if (superClass == null) {
            String name = context.getFrameName();
            return callMethodMissing(context, self, klazz.searchMethod(name), name, CallType.SUPER, block);
        }
View Full Code Here

    }
   
    public static IRubyObject invokeSuper(ThreadContext context, IRubyObject self, IRubyObject arg0, Block block) {
        RubyModule klazz = context.getFrameKlazz();

        RubyClass superClass = findImplementerIfNecessary(self.getMetaClass(), klazz).getSuperClass();
       
        if (superClass == null) {
            String name = context.getFrameName();
            return callMethodMissing(context, self, klazz.searchMethod(name), name, arg0, CallType.SUPER, block);
        }
View Full Code Here

    }
   
    public static IRubyObject invokeSuper(ThreadContext context, IRubyObject self, IRubyObject arg0, IRubyObject arg1, Block block) {
        RubyModule klazz = context.getFrameKlazz();

        RubyClass superClass = findImplementerIfNecessary(self.getMetaClass(), klazz).getSuperClass();
       
        if (superClass == null) {
            String name = context.getFrameName();
            return callMethodMissing(context, self, klazz.searchMethod(name), name, arg0, arg1, CallType.SUPER, block);
        }
View Full Code Here

    }
   
    public static IRubyObject invokeSuper(ThreadContext context, IRubyObject self, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block) {
        RubyModule klazz = context.getFrameKlazz();

        RubyClass superClass = findImplementerIfNecessary(self.getMetaClass(), klazz).getSuperClass();
       
        if (superClass == null) {
            String name = context.getFrameName();
            return callMethodMissing(context, self, klazz.searchMethod(name), name, arg0, arg1, arg2, CallType.SUPER, block);
        }
View Full Code Here

        if (currentException instanceof RaiseException) {
            return isExceptionHandled(((RaiseException)currentException).getException(), exceptions, runtime, context, self);
        } else {
            for (int i = 0; i < exceptions.length; i++) {
                if (exceptions[i] instanceof RubyClass) {
                    RubyClass rubyClass = (RubyClass)exceptions[i];
                    JavaClass javaClass = (JavaClass)rubyClass.fastGetInstanceVariable("@java_class");
                    if (javaClass != null) {
                        Class cls = javaClass.javaClass();
                        if (cls.isInstance(currentException)) {
                            return runtime.getTrue();
                        }
View Full Code Here

        if (receiver.isFrozen()) {
            throw runtime.newFrozenError("object");
        }
       
        RubyClass rubyClass = receiver.getSingletonClass();

        if (runtime.getSafeLevel() >= 4 && rubyClass.getMethods().get(name) != null) {
            throw runtime.newSecurityError("redefining method prohibited.");
        }
       
        return rubyClass;
    }
View Full Code Here

* @author <a href="mailto:ola.bini@ki.se">Ola Bini</a>
*/
@JRubyClass(name="IPSocket", parent="BasicSocket")
public class RubyIPSocket extends RubyBasicSocket {
    static void createIPSocket(Ruby runtime) {
        RubyClass rb_cIPSocket = runtime.defineClass("IPSocket", runtime.fastGetClass("BasicSocket"), IPSOCKET_ALLOCATOR);
       
        rb_cIPSocket.defineAnnotatedMethods(RubyIPSocket.class);

        runtime.getObject().fastSetConstant("IPsocket",rb_cIPSocket);
    }
View Full Code Here

* @author <a href="mailto:ola.bini@ki.se">Ola Bini</a>
*/
@JRubyClass(name="TCPServer", parent="TCPSocket")
public class RubyTCPServer extends RubyTCPSocket {
    static void createTCPServer(Ruby runtime) {
        RubyClass rb_cTCPServer = runtime.defineClass("TCPServer", runtime.fastGetClass("TCPSocket"), TCPSERVER_ALLOCATOR);

        rb_cTCPServer.defineAnnotatedMethods(RubyTCPServer.class);
       
        runtime.getObject().fastSetConstant("TCPserver",rb_cTCPServer);
    }
View Full Code Here

    }
   
    public RubyClass getProxyClass() {
        // allow proxy to be read without synchronization. if proxy
        // is under construction, only the building thread can see it.
        RubyClass proxy;
        if ((proxy = proxyClass) != null) {
            // proxy is complete, return it
            return proxy;
        } else if (proxyLock.isHeldByCurrentThread()) {
            // proxy is under construction, building thread can
View Full Code Here

TOP

Related Classes of org.jruby.RubyClass$SpecificArityNew

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.