public static void main(String args[]) throws FileNotFoundException {
        // TODO: use sane arg parsing
        if (args.length != 7 && args.length != 8) {
            throw new RuntimeException("usage: Processor trace-file tcg-dump-out inst-info-dump hierarchy-dump test-case-name test-method-name tested-class [output-package]");
        }
        String traceFileName = args[0];
        String tcgDump = args[1];
        String iiDump = args[2];
        String hierDump = args[3];
        String testCaseName = args[4];
        String testMethodName = args[5];
        ClassName testedClass = ClassName.fromDotted(args[6]);
        String outputPackage = args.length == 8
            ? args[7]
            : testedClass.dottedPackageName();
        Hierarchy hierarchy = Hierarchy.createFromFile(hierDump);
        TestCaseGenerator tcg
            = new TestCaseGenerator(testCaseName, outputPackage);
        TestMethodGenerator tmg = new TestMethodGenerator(testMethodName,
                                                          hierarchy,
                                                          true);
        tcg.addChunk(tmg);
        InputStream in = new FileInputStream(traceFileName);
        Deserializer<TraceEvent> d
            = Deserializer.getDeserializer(in, TraceEvent.class);
        Map<Instance, InstanceInfo> iis = readInstanceInfos(iiDump);
        Processor p = new Processor(tmg, testedClass, iis, hierarchy);
        d.process(p);
        PrintStream ps = new PrintStream(tcgDump);
        Serializer<TestCaseGenerator> s = Serializer.getSerializer(ps);
        s.write(tcg);
        s.close();
    }
public static void main(String args[]) throws FileNotFoundException {
       
        if (args.length != 7 && args.length != 8) {
            throw new RuntimeException("usage: Processor trace-file tcg-dump-out inst-info-dump hierarchy-dump test-case-name test-method-name tested-class [output-package]");
        }
        String traceFileName = args[0];
        String tcgDump = args[1];
        String iiDump = args[2];
        String hierDump = args[3];
        String testCaseName = args[4];
        String testMethodName = args[5];
        ClassName testedClass = ClassName.fromDotted(args[6]);
        String outputPackage = args.length == 8
            ? args[7]
            : testedClass.dottedPackageName();
        Hierarchy hierarchy = Hierarchy.createFromFile(hierDump);
        TestCaseGenerator tcg
            = new TestCaseGenerator(testCaseName, outputPackage);
        TestMethodGenerator tmg = new TestMethodGenerator(testMethodName,
                                                          hierarchy,
                                                          true);
        tcg.addChunk(tmg);
        InputStream in = new FileInputStream(traceFileName);
        Deserializer<TraceEvent> d
            = Deserializer.getDeserializer(in, TraceEvent.class);
        Map<Instance, InstanceInfo> iis = readInstanceInfos(iiDump);
        Processor p = new Processor(tmg, testedClass, iis, hierarchy);
        d.process(p);
        PrintStream ps = new PrintStream(tcgDump);
        Serializer<TestCaseGenerator> s = Serializer.getSerializer(ps);
        s.write(tcg);
        s.close();
    }
public static void main(string args[]) throws filenotfoundexception { if (args.length != 7 && args.length != 8) { throw new runtimeexception("usage: processor trace-file tcg-dump-out inst-info-dump hierarchy-dump test-case-name test-method-name tested-class [output-package]"); } string tracefilename = args[0]; string tcgdump = args[1]; string iidump = args[2]; string hierdump = args[3]; string testcasename = args[4]; string testmethodname = args[5]; classname testedclass = classname.fromdotted(args[6]); string outputpackage = args.length == 8 ? args[7] : testedclass.dottedpackagename(); hierarchy hierarchy = hierarchy.createfromfile(hierdump); testcasegenerator tcg = new testcasegenerator(testcasename, outputpackage); testmethodgenerator tmg = new testmethodgenerator(testmethodname, hierarchy, true); tcg.addchunk(tmg); inputstream in = new fileinputstream(tracefilename); deserializer<traceevent> d = deserializer.getdeserializer(in, traceevent.class); map<instance, instanceinfo> iis = readinstanceinfos(iidump); processor p = new processor(tmg, testedclass, iis, hierarchy); d.process(p); printstream ps = new printstream(tcgdump); serializer<testcasegenerator> s = serializer.getserializer(ps); s.write(tcg); s.close(); }