com.sun.tools.javac.file.ZipFileIndexCache Java Examples

The following examples show how to use com.sun.tools.javac.file.ZipFileIndexCache. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CreateSymbolsTestImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
Path prepareVersionedCTSym(String code7, String code8) throws Exception {
    String testClasses = System.getProperty("test.classes");
    Path output = Paths.get(testClasses, "test-data" + i++);
    deleteRecursively(output);
    Files.createDirectories(output);
    Path ver7Jar = output.resolve("7.jar");
    compileAndPack(output, ver7Jar, code7);
    Path ver8Jar = output.resolve("8.jar");
    compileAndPack(output, ver8Jar, code8);

    ZipFileIndexCache.getSharedInstance().clearCache();

    Path classes = output.resolve("classes");

    Files.createDirectories(classes);

    Path ctSym = output.resolve("ct.sym");

    deleteRecursively(ctSym);

    CreateSymbols.ALLOW_NON_EXISTING_CLASSES = true;
    CreateSymbols.EXTENSION = ".class";

    testGenerate(ver7Jar, ver8Jar, ctSym, "8", classes.toAbsolutePath().toString());

    return classes;
}