View Javadoc

    1   /*
    2    * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
    3    */
    4   package net.sourceforge.pmd;
    5
    6   import net.sourceforge.pmd.ast.JavaParser;
    7
    8   import java.io.InputStream;
    9   import java.io.Reader;
    10
    11  /***
    12   * Interface to create JDK-appropriate parsers.
    13   *
    14   * @author Tom Copeland
    15   */
    16  public interface TargetJDKVersion {
    17      /***
    18       * Creates a parser.
    19       *
    20       * @param in the stream to parser
    21       * @return a parser for the input stream
    22       */
    23      public JavaParser createParser(InputStream in);
    24
    25      /***
    26       * Creates a parser.
    27       *
    28       * @param in an input stream reader
    29       * @return a parser for the stream read by the stream reader
    30       */
    31      public JavaParser createParser(Reader in);
    32
    33      public String getVersionString();
    34  }