Search in sources :

Example 1 with Java17Parser

use of net.sourceforge.pmd.lang.java.Java17Parser in project controller by opendaylight.

the class AbstractGeneratedObjectTest method parse.

protected Node parse(File dstFile) throws IOException {
    assertNotNull(dstFile);
    LOG.debug(Files.toString(dstFile, StandardCharsets.UTF_8));
    Parser parser = new Java17Parser(new ParserOptions());
    return parser.parse(dstFile.toString(), new FileReader(dstFile));
}
Also used : ParserOptions(net.sourceforge.pmd.lang.ParserOptions) FileReader(java.io.FileReader) Java17Parser(net.sourceforge.pmd.lang.java.Java17Parser) Java17Parser(net.sourceforge.pmd.lang.java.Java17Parser) Parser(net.sourceforge.pmd.lang.Parser)

Aggregations

FileReader (java.io.FileReader)1 Parser (net.sourceforge.pmd.lang.Parser)1 ParserOptions (net.sourceforge.pmd.lang.ParserOptions)1 Java17Parser (net.sourceforge.pmd.lang.java.Java17Parser)1