Package org.jruby.internal.runtime.methods

Examples of org.jruby.internal.runtime.methods.DefaultMethod


        scope.determineModule();
       
        // Make a nil node if no body.  Notice this is not part of AST.
        Node body = bodyNode == null ? new NilNode(getPosition()) : bodyNode;
       
        DefaultMethod newMethod = new DefaultMethod(containingClass, scope,
                body, (ArgsNode) argsNode,
                visibility, getPosition());
  
        containingClass.addMethod(name, newMethod);
  
View Full Code Here


        scope.determineModule();
     
        // Make a nil node if no body.  Notice this is not part of AST.
        Node body = bodyNode == null ? new NilNode(getPosition()) : bodyNode;
       
        DefaultMethod newMethod = new DefaultMethod(rubyClass, scope, body, argsNode,
                Visibility.PUBLIC, getPosition());
  
        rubyClass.addMethod(name, newMethod);
        receiver.callMethod(context, "singleton_method_added", runtime.fastNewSymbol(name));
  
View Full Code Here

                    if (!expr) context.consumeCurrentValue();
                    return true;
                }
            }
            if (method instanceof DefaultMethod) {
                DefaultMethod target = (DefaultMethod)method;
                if (target.getBodyNode() == currentBodyNode) {
                    context.getInvocationCompiler().invokeRecursive(name, generation, argsCallback, closure, callType, iterator);
                    if (!expr) context.consumeCurrentValue();
                    return true;
                }
            }

            if (method instanceof JittedMethod) {
                DefaultMethod target = (DefaultMethod)((JittedMethod)method).getRealMethod();
                if (target.getBodyNode() == currentBodyNode) {
                    context.getInvocationCompiler().invokeRecursive(name, generation, argsCallback, closure, callType, iterator);
                    if (!expr) context.consumeCurrentValue();
                    return true;
                }
            }
View Full Code Here

            simpleBody = target.getBodyNode();
            while (simpleBody instanceof NewlineNode) simpleBody = ((NewlineNode)simpleBody).getNextNode();
        }

        if (method instanceof DefaultMethod) {
            DefaultMethod target = (DefaultMethod)method;
            simpleBody = target.getBodyNode();
            while (simpleBody instanceof NewlineNode) simpleBody = ((NewlineNode)simpleBody).getNextNode();
        }

        if (method instanceof JittedMethod) {
            DefaultMethod target = (DefaultMethod)((JittedMethod)method).getRealMethod();
            simpleBody = target.getBodyNode();
            while (simpleBody instanceof NewlineNode) simpleBody = ((NewlineNode)simpleBody).getNextNode();
        }

        if (simpleBody != null) {
            switch (simpleBody.getNodeType()) {
View Full Code Here

TOP

Related Classes of org.jruby.internal.runtime.methods.DefaultMethod

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.