01: package net.sourceforge.jrefactory.factory;
02:
03: import java.io.Reader;
04:
05: /**
06: * Generates new parsers for a java file
07: *
08: * @author Chris Seguin
09: * @author <a href="JRefactory@ladyshot.demon.co.uk">Mike Atkinson</a>
10: * @since v 1.0
11: * @version $Id: InputStreamParserFactory.java,v 1.2 2003/12/02 23:36:12 mikeatkinson Exp $
12: * @created June 6, 1999
13: */
14: public class InputStreamParserFactory extends ParserFactory {
15: private Reader reader;
16: private String key;
17:
18: /**
19: * Constructor for a file ParserFactory
20: *
21: * @param reader Description of Parameter
22: * @param initKey Description of Parameter
23: * @since v 1.0
24: */
25: public InputStreamParserFactory(Reader reader, String initKey) {
26: this .reader = reader;
27: key = initKey;
28: }
29:
30: /**
31: * Return the input stream
32: *
33: * @return the input stream
34: * @since v 1.0
35: */
36: protected Reader getReader() {
37: return reader;
38: }
39:
40: /**
41: * A method to return some key identifying the file that is being parsed
42: *
43: * @return the identifier
44: * @since v 1.0
45: */
46: protected String getKey() {
47: return key;
48: }
49: }
|