@Test public void tolerateEmptyFiles() throws Exception { createSourceFiles("com/hello/", "com/hello/package-info.java"); Path file = writeFile(workspace.resolve("com/hello/package-info.java"), "package com.hello;"); JavaSourceFileParser parser = createParser(file); assertThatGraphsEqual(parser.getClassToClass(), newGraph()); }
ImmutableGraph<String> getClassToClass() { return classToClass; }
JavaSourceFileParser { ImmutableGraph<String> getClassToClass() { return classToClass; } }
JavaSourceFileParser { ImmutableGraph<String> getClassToClass() { return classToClass; } JavaSourceFileParser(
      ImmutableList<Path> sourceFilePaths,
      ImmutableList<Path> contentRoots,
      ImmutableSet<Path> oneRulePerPackageRoots); }
JavaSourceFileParser { ImmutableGraph<String> getClassToClass() { return classToClass; } JavaSourceFileParser(
      ImmutableList<Path> sourceFilePaths,
      ImmutableList<Path> contentRoots,
      ImmutableSet<Path> oneRulePerPackageRoots); ImmutableMap<String, String> getClassToFile(); ImmutableMap<String, String> getFilesToRuleKind(); }
JavaSourceFileParser { ImmutableGraph<String> getClassToClass() { return classToClass; } JavaSourceFileParser(
      ImmutableList<Path> sourceFilePaths,
      ImmutableList<Path> contentRoots,
      ImmutableSet<Path> oneRulePerPackageRoots); ImmutableMap<String, String> getClassToFile(); ImmutableMap<String, String> getFilesToRuleKind();  }