Java15Parser.java
01 /**
02  * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
03  */
04 package net.sourceforge.pmd.lang.java;
05 
06 import java.io.Reader;
07 
08 import net.sourceforge.pmd.lang.java.ast.JavaParser;
09 import net.sourceforge.pmd.lang.java.ast.ParseException;
10 
11 /**
12  * Adapter for the JavaParser, using Java 1.5 grammar.
13  *
14  @author Pieter_Van_Raemdonck - Application Engineers NV/SA - www.ae.be
15  */
16 public class Java15Parser extends AbstractJavaParser {
17 
18     @Override
19     protected JavaParser createJavaParser(Reader sourcethrows ParseException {
20   JavaParser javaParser = super.createJavaParser(source);
21   javaParser.setJDK15();
22   return javaParser;
23     }
24 }