Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.jruby.anno;
 
 import java.util.List;
 import java.util.Map;
public class InvokerGenerator {
    private static final Logger LOG = LoggerFactory.getLogger("InvokerGenerator");
    public static final boolean DEBUG = false;
    
    public static void main(String[] argsthrows Exception {
        FileReader fr = new FileReader(args[0]);
        BufferedReader br = new BufferedReader(fr);
        
        List<StringclassNames = new ArrayList<String>();
        try {
            String line;
            while ((line = br.readLine()) != null) {
                classNames.add(line);
            }
        } finally {
            br.close();
        }
        DumpingInvocationMethodFactory dumper = new DumpingInvocationMethodFactory(args[1], new JRubyClassLoader(ClassLoader.getSystemClassLoader()));
        for (String name : classNames) {
            MethodClumper clumper = new MethodClumper();
            
            try {
                if (.debug("generating for class {}"name);
                Class cls = Class.forName(namefalseInvokerGenerator.class.getClassLoader());
                clumper.clump(cls);
                for (Map.Entry<StringList<JavaMethodDescriptor>> entry : clumper.getStaticAnnotatedMethods().entrySet()) {
                    dumper.getAnnotatedMethodClass(entry.getValue());
                }
                for (Map.Entry<StringList<JavaMethodDescriptor>> entry : clumper.getAnnotatedMethods().entrySet()) {
                    dumper.getAnnotatedMethodClass(entry.getValue());
                }
                for (Map.Entry<StringList<JavaMethodDescriptor>> entry : clumper.getStaticAnnotatedMethods1_8().entrySet()) {
                    dumper.getAnnotatedMethodClass(entry.getValue());
                }
                for (Map.Entry<StringList<JavaMethodDescriptor>> entry : clumper.getAnnotatedMethods1_8().entrySet()) {
                    dumper.getAnnotatedMethodClass(entry.getValue());
                }
                for (Map.Entry<StringList<JavaMethodDescriptor>> entry : clumper.getStaticAnnotatedMethods1_9().entrySet()) {
                    dumper.getAnnotatedMethodClass(entry.getValue());
                }
                for (Map.Entry<StringList<JavaMethodDescriptor>> entry : clumper.getAnnotatedMethods1_9().entrySet()) {
                    dumper.getAnnotatedMethodClass(entry.getValue());
                }
                for (Map.Entry<StringList<JavaMethodDescriptor>> entry : clumper.getStaticAnnotatedMethods2_0().entrySet()) {
                    dumper.getAnnotatedMethodClass(entry.getValue());
                }
                for (Map.Entry<StringList<JavaMethodDescriptor>> entry : clumper.getAnnotatedMethods2_0().entrySet()) {
                    dumper.getAnnotatedMethodClass(entry.getValue());
                }
            } catch (Exception e) {
                e.printStackTrace();
                throw e;
            }
        }
    }
New to GrepCode? Check out our FAQ X