01: package org.acm.seguin.pmd.cpd;
02:
03: import java.io.File;
04: import java.io.FilenameFilter;
05:
06: public class JavaLanguage implements Language {
07:
08: public static class JavaFileOrDirectoryFilter implements
09: FilenameFilter {
10: public boolean accept(File dir, String filename) {
11: return filename.endsWith("java")
12: || (new File(dir.getAbsolutePath()
13: + System.getProperty("file.separator")
14: + filename).isDirectory());
15: }
16: }
17:
18: public Tokenizer getTokenizer() {
19: return new JavaTokenizer();
20: }
21:
22: public FilenameFilter getFileFilter() {
23: return new JavaFileOrDirectoryFilter();
24: }
25: }
|