Examples of MethodFactory


Examples of org.jruby.runtime.MethodFactory

        RubyClass rubyClass = performSingletonMethodChecks(runtime, receiver, name);
       
        StaticScope scope = creatScopeForClass(context, scopeNames, required, optional, rest);
       
        MethodFactory factory = MethodFactory.createFactory(compiledClass.getClassLoader());
        DynamicMethod method = constructSingletonMethod(factory, rubyClass, javaName, arity, scope,scriptObject, callConfig);
       
        rubyClass.addMethod(name, method);
       
        callSingletonMethodHook(receiver,context, runtime.fastNewSymbol(name));
View Full Code Here

Examples of org.jruby.runtime.MethodFactory

        populator.populate(this, clazz);
    }

    @Deprecated
    private void defineAnnotatedMethodsIndexed(Class clazz) {
        MethodFactory methodFactory = MethodFactory.createFactory(getRuntime().getJRubyClassLoader());
        methodFactory.defineIndexedAnnotatedMethods(this, clazz, methodDefiningCallback);
    }
View Full Code Here

Examples of org.jruby.runtime.MethodFactory

   
    public static final TypePopulator DEFAULT = new DefaultTypePopulator();
    public static class DefaultTypePopulator extends TypePopulator {
        public void populate(RubyModule clsmod, Class clazz) {
            // fallback on non-pregenerated logic
            MethodFactory methodFactory = MethodFactory.createFactory(clsmod.getRuntime().getJRubyClassLoader());
            Ruby runtime = clsmod.getRuntime();
           
            RubyModule.MethodClumper clumper = new RubyModule.MethodClumper();
            clumper.clump(clazz);
View Full Code Here

Examples of org.jruby.runtime.MethodFactory

    }
   
    public static CompiledBlockCallback createBlockCallback(Ruby runtime, Object scriptObject, String closureMethod, String file, int line) {
        Class scriptClass = scriptObject.getClass();
        ClassLoader scriptClassLoader = scriptClass.getClassLoader();
        MethodFactory factory = MethodFactory.createFactory(scriptClassLoader);
       
        return factory.getBlockCallback(closureMethod, file, line, scriptObject);
    }
View Full Code Here

Examples of org.jruby.runtime.MethodFactory

    }

    public static CompiledBlockCallback19 createBlockCallback19(Ruby runtime, Object scriptObject, String closureMethod, String file, int line) {
        Class scriptClass = scriptObject.getClass();
        ClassLoader scriptClassLoader = scriptClass.getClassLoader();
        MethodFactory factory = MethodFactory.createFactory(scriptClassLoader);

        return factory.getBlockCallback19(closureMethod, file, line, scriptObject);
    }
View Full Code Here

Examples of org.jruby.runtime.MethodFactory

        return factory.getBlockCallback19(closureMethod, file, line, scriptObject);
    }

    public static byte[] createBlockCallbackOffline(String classPath, String closureMethod, String file, int line) {
        MethodFactory factory = MethodFactory.createFactory(RuntimeHelpers.class.getClassLoader());

        return factory.getBlockCallbackOffline(closureMethod, file, line, classPath);
    }
View Full Code Here

Examples of org.jruby.runtime.MethodFactory

        return factory.getBlockCallbackOffline(closureMethod, file, line, classPath);
    }

    public static byte[] createBlockCallback19Offline(String classPath, String closureMethod, String file, int line) {
        MethodFactory factory = MethodFactory.createFactory(RuntimeHelpers.class.getClassLoader());

        return factory.getBlockCallback19Offline(closureMethod, file, line, classPath);
    }
View Full Code Here

Examples of org.jruby.runtime.MethodFactory

       
        performNormalMethodChecks(containingClass, runtime, name);

        StaticScope scope = createScopeForClass(context, scopeString);
       
        MethodFactory factory = MethodFactory.createFactory(compiledClass.getClassLoader());
        DynamicMethod method = constructNormalMethod(
                factory, javaName,
                name, containingClass, new SimpleSourcePosition(filename, line), arity, scope, visibility, scriptObject,
                callConfig,
                parameterDesc);
View Full Code Here

Examples of org.jruby.runtime.MethodFactory

        RubyClass rubyClass = performSingletonMethodChecks(runtime, receiver, name);
       
        StaticScope scope = createScopeForClass(context, scopeString);
       
        MethodFactory factory = MethodFactory.createFactory(compiledClass.getClassLoader());
        DynamicMethod method = constructSingletonMethod(
                factory, javaName, rubyClass,
                new SimpleSourcePosition(filename, line), arity, scope,
                scriptObject, callConfig, parameterDesc);
       
View Full Code Here

Examples of org.jruby.runtime.MethodFactory

       
        return runtime.getNil();
    }

    public static byte[] defOffline(String name, String classPath, String invokerName, Arity arity, StaticScope scope, CallConfiguration callConfig, String filename, int line) {
        MethodFactory factory = MethodFactory.createFactory(RuntimeHelpers.class.getClassLoader());
        byte[] methodBytes = factory.getCompiledMethodOffline(name, classPath, invokerName, arity, scope, callConfig, filename, line);

        return methodBytes;
    }
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.