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.4 grammar.
    14   *
    15   * @author Pieter_Van_Raemdonck - Application Engineers NV/SA - www.ae.be
    16   */
    17  public class Java14Parser extends AbstractJavaParser {
    18
    19      public Java14Parser(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(4);
    27  	return javaParser;
    28      }
    29  }