KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sourceforge > pmd > cpd > JavaLanguage


1 /**
2  * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3  */

4 package net.sourceforge.pmd.cpd;
5
6 import net.sourceforge.pmd.SourceFileSelector;
7
8 import java.io.FilenameFilter JavaDoc;
9 import java.util.Properties JavaDoc;
10
11 public class JavaLanguage implements Language {
12
13     private JavaTokenizer tokenizer;
14
15     private SourceFileSelector sourceFileSelector;
16
17     public JavaLanguage() {
18         this(new Properties JavaDoc());
19     }
20
21     public JavaLanguage(Properties JavaDoc properties) {
22         tokenizer = new JavaTokenizer();
23         tokenizer.setProperties(properties);
24         sourceFileSelector = new SourceFileSelector();
25     }
26
27     public Tokenizer getTokenizer() {
28         return tokenizer;
29     }
30
31     public FilenameFilter JavaDoc getFileFilter() {
32         return new SourceFileOrDirectoryFilter(sourceFileSelector);
33     }
34 }
35
Popular Tags