Java Code Examples for

The following are Jave code examples for showing how to use openReader() of the class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: jtsgen   File:   Source Code and License Vote up 5 votes
public static List<String> findSourceLine(Compilation c, String packageName, String fileName, Pattern pattern) throws IOException {
    Assert.assertTrue(c.generatedFile(StandardLocation.SOURCE_OUTPUT,packageName, fileName).isPresent());
    JavaFileObject jfo = c.generatedFile(StandardLocation.SOURCE_OUTPUT,packageName, fileName).get();
    try (Reader r = jfo.openReader(false)) {
        return IOUtils.readLines(r).stream().filter( (x) -> pattern.matcher(x).find()).collect(Collectors.toList());