01: /*
02: * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
03: */
04: package net.sourceforge.pmd;
05:
06: import net.sourceforge.pmd.ast.JavaParser;
07:
08: import java.io.InputStream;
09: 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:
35: /**
36: * Default target version.
37: */
38: public static final TargetJDKVersion DEFAULT_JDK_VERSION = new TargetJDK1_5();
39: }
|