View Javadoc

1   /**
2    * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3    */
4   package net.sourceforge.pmd.lang.java;
5   
6   import java.io.Reader;
7   
8   import net.sourceforge.pmd.lang.ParserOptions;
9   import net.sourceforge.pmd.lang.java.ast.JavaParser;
10  import net.sourceforge.pmd.lang.java.ast.ParseException;
11  
12  /**
13   * Adapter for the JavaParser, using Java 1.3 grammar.
14   *
15   * @author Pieter_Van_Raemdonck - Application Engineers NV/SA - www.ae.be
16   */
17  public class Java13Parser extends AbstractJavaParser {
18  
19      public Java13Parser(ParserOptions parserOptions) {
20  	super(parserOptions);
21      }
22  
23      @Override
24      protected JavaParser createJavaParser(Reader source) throws ParseException {
25  	JavaParser javaParser = super.createJavaParser(source);
26  	javaParser.setJdkVersion(3);
27  	return javaParser;
28      }
29  }