Package org.jruby.internal.runtime.methods

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


     * dynamically loading code.
     * @return A new MethodFactory.
     */
    public static MethodFactory createFactory(ClassLoader classLoader) {
        if (reflection) return new ReflectionMethodFactory();
        if (dumping) return new DumpingInvocationMethodFactory(dumpingPath, classLoader);

        return new InvocationMethodFactory(classLoader);
    }
View Full Code Here


            }
        } finally {
            br.close();
        }

        DumpingInvocationMethodFactory dumper = new DumpingInvocationMethodFactory(args[1], new JRubyClassLoader(ClassLoader.getSystemClassLoader()));

        for (String name : classNames) {
            MethodClumper clumper = new MethodClumper();
           
            try {
                if (DEBUG) System.out.println("generating for class " + name);
                Class cls = Class.forName(name);

                clumper.clump(cls);

                for (Map.Entry<String, List<JavaMethodDescriptor>> entry : clumper.getStaticAnnotatedMethods().entrySet()) {
                    dumper.getAnnotatedMethodClass(entry.getValue());
                }

                for (Map.Entry<String, List<JavaMethodDescriptor>> entry : clumper.getAnnotatedMethods().entrySet()) {
                    dumper.getAnnotatedMethodClass(entry.getValue());
                }

                for (Map.Entry<String, List<JavaMethodDescriptor>> entry : clumper.getStaticAnnotatedMethods1_8().entrySet()) {
                    dumper.getAnnotatedMethodClass(entry.getValue());
                }

                for (Map.Entry<String, List<JavaMethodDescriptor>> entry : clumper.getAnnotatedMethods1_8().entrySet()) {
                    dumper.getAnnotatedMethodClass(entry.getValue());
                }

                for (Map.Entry<String, List<JavaMethodDescriptor>> entry : clumper.getStaticAnnotatedMethods1_9().entrySet()) {
                    dumper.getAnnotatedMethodClass(entry.getValue());
                }

                for (Map.Entry<String, List<JavaMethodDescriptor>> entry : clumper.getAnnotatedMethods1_9().entrySet()) {
                    dumper.getAnnotatedMethodClass(entry.getValue());
                }
            } catch (Exception e) {
                e.printStackTrace();
                throw e;
            }
View Full Code Here

            }
        } finally {
            br.close();
        }

        DumpingInvocationMethodFactory dumper = new DumpingInvocationMethodFactory(args[1], new JRubyClassLoader(ClassLoader.getSystemClassLoader()));

        for (String name : classNames) {
            MethodClumper clumper = new MethodClumper();
           
            try {
                if (DEBUG) System.out.println("generating for class " + name);
                Class cls = Class.forName(name, false, InvokerGenerator.class.getClassLoader());

                clumper.clump(cls);

                for (Map.Entry<String, List<JavaMethodDescriptor>> entry : clumper.getStaticAnnotatedMethods().entrySet()) {
                    dumper.getAnnotatedMethodClass(entry.getValue());
                }

                for (Map.Entry<String, List<JavaMethodDescriptor>> entry : clumper.getAnnotatedMethods().entrySet()) {
                    dumper.getAnnotatedMethodClass(entry.getValue());
                }

                for (Map.Entry<String, List<JavaMethodDescriptor>> entry : clumper.getStaticAnnotatedMethods1_8().entrySet()) {
                    dumper.getAnnotatedMethodClass(entry.getValue());
                }

                for (Map.Entry<String, List<JavaMethodDescriptor>> entry : clumper.getAnnotatedMethods1_8().entrySet()) {
                    dumper.getAnnotatedMethodClass(entry.getValue());
                }

                for (Map.Entry<String, List<JavaMethodDescriptor>> entry : clumper.getStaticAnnotatedMethods1_9().entrySet()) {
                    dumper.getAnnotatedMethodClass(entry.getValue());
                }

                for (Map.Entry<String, List<JavaMethodDescriptor>> entry : clumper.getAnnotatedMethods1_9().entrySet()) {
                    dumper.getAnnotatedMethodClass(entry.getValue());
                }
            } catch (Exception e) {
                e.printStackTrace();
                throw e;
            }
View Full Code Here

    public static MethodFactory createFactory(ClassLoader classLoader) {
        // if reflection is forced or we've determined that we can't load bytecode, use reflection
        if (reflection || !CAN_LOAD_BYTECODE) return new ReflectionMethodFactory();

        // if we're dumping invokers to disk, use dumping
        if (dumping) return new DumpingInvocationMethodFactory(dumpingPath, classLoader);

        // otherwise, generate invokers at runtime
        return new InvocationMethodFactory(classLoader);
    }
View Full Code Here

            }
        } finally {
            br.close();
        }

        DumpingInvocationMethodFactory dumper = new DumpingInvocationMethodFactory(args[1], new JRubyClassLoader(ClassLoader.getSystemClassLoader()));

        for (String name : classNames) {
            MethodClumper clumper = new MethodClumper();
           
            try {
                if (DEBUG) LOG.debug("generating for class {}", name);
                Class cls = Class.forName(name, false, InvokerGenerator.class.getClassLoader());

                clumper.clump(cls);

                for (Map.Entry<String, List<JavaMethodDescriptor>> entry : clumper.getStaticAnnotatedMethods().entrySet()) {
                    dumper.getAnnotatedMethodClass(entry.getValue());
                }

                for (Map.Entry<String, List<JavaMethodDescriptor>> entry : clumper.getAnnotatedMethods().entrySet()) {
                    dumper.getAnnotatedMethodClass(entry.getValue());
                }

                for (Map.Entry<String, List<JavaMethodDescriptor>> entry : clumper.getStaticAnnotatedMethods1_8().entrySet()) {
                    dumper.getAnnotatedMethodClass(entry.getValue());
                }

                for (Map.Entry<String, List<JavaMethodDescriptor>> entry : clumper.getAnnotatedMethods1_8().entrySet()) {
                    dumper.getAnnotatedMethodClass(entry.getValue());
                }

                for (Map.Entry<String, List<JavaMethodDescriptor>> entry : clumper.getStaticAnnotatedMethods1_9().entrySet()) {
                    dumper.getAnnotatedMethodClass(entry.getValue());
                }

                for (Map.Entry<String, List<JavaMethodDescriptor>> entry : clumper.getAnnotatedMethods1_9().entrySet()) {
                    dumper.getAnnotatedMethodClass(entry.getValue());
                }

                for (Map.Entry<String, List<JavaMethodDescriptor>> entry : clumper.getStaticAnnotatedMethods2_0().entrySet()) {
                    dumper.getAnnotatedMethodClass(entry.getValue());
                }

                for (Map.Entry<String, List<JavaMethodDescriptor>> entry : clumper.getAnnotatedMethods2_0().entrySet()) {
                    dumper.getAnnotatedMethodClass(entry.getValue());
                }
            } catch (Exception e) {
                e.printStackTrace();
                throw e;
            }
View Full Code Here

            }
        } finally {
            br.close();
        }

        DumpingInvocationMethodFactory dumper = new DumpingInvocationMethodFactory(args[1], new JRubyClassLoader(ClassLoader.getSystemClassLoader()));

        for (String name : classNames) {
            MethodClumper clumper = new MethodClumper();
           
            try {
                if (DEBUG) LOG.debug("generating for class {}", name);
                Class cls = Class.forName(name, false, InvokerGenerator.class.getClassLoader());

                clumper.clump(cls);

                for (Map.Entry<String, List<JavaMethodDescriptor>> entry : clumper.getStaticAnnotatedMethods().entrySet()) {
                    dumper.getAnnotatedMethodClass(entry.getValue());
                }

                for (Map.Entry<String, List<JavaMethodDescriptor>> entry : clumper.getAnnotatedMethods().entrySet()) {
                    dumper.getAnnotatedMethodClass(entry.getValue());
                }
            } catch (Exception e) {
                e.printStackTrace();
                throw e;
            }
View Full Code Here

TOP

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

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.