View Javadoc
1   /**
2    * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3    */
4   package net.sourceforge.pmd.lang.plsql;
5   
6   import java.io.Reader;
7   
8   import net.sourceforge.pmd.lang.TokenManager;
9   import net.sourceforge.pmd.lang.ast.SimpleCharStream;
10  import net.sourceforge.pmd.lang.plsql.ast.PLSQLParserTokenManager;
11  
12  /**
13   * PLSQL Token Manager implementation.
14   */
15  public class PLSQLTokenManager implements TokenManager {
16      private final PLSQLParserTokenManager tokenManager;
17  
18      public PLSQLTokenManager(Reader source) {
19  	tokenManager = new PLSQLParserTokenManager(new SimpleCharStream(source));
20      }
21  
22      public Object getNextToken() {
23  	return tokenManager.getNextToken();
24      }
25  
26      public void setFileName(String fileName) {
27          PLSQLParserTokenManager.setFileName(fileName);
28      }
29  }